Skip to content

Commit 95eb41a

Browse files
committed
fix toggle debug
1 parent bac34cc commit 95eb41a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/menu/src/OptionItem.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,15 @@ bool OptionItem::init(CCSize const& size, Option option) {
195195

196196
void OptionItem::onToggle(CCObject*) {
197197
if (m_impl->toggler && m_impl->compatible) {
198-
(void)options::set(m_impl->option.id, !m_impl->toggler->isToggled());
198+
auto now = !m_impl->toggler->isToggled();
199+
200+
(void)options::set(m_impl->option.id, now);
199201

200202
if (m_impl->option.restart) {
201203
Notification::create("Restart required!", NotificationIcon::Warning, 2.5f)->show();
202204
log::warn("Restart required to apply option {}", m_impl->option.id);
203205
};
204206

205-
auto now = options::get(m_impl->option.id);
206-
207207
log::info("Option {} now set to {}", m_impl->option.name, now ? "disabled" : "enabled"); // wtf is it other way around lmao
208208
} else if (m_impl->toggler) {
209209
Notification::create(fmt::format("{} is unavailable for {}", m_impl->option.name, GEODE_PLATFORM_NAME), NotificationIcon::Error, 1.25f)->show();

0 commit comments

Comments
 (0)