Fixed manual override event (#42280)

Issue: When using the shortcut to switch modes manually, the service
would try to correct the theme to the expected mode.
Problem: Event resetting between each loop.
Fix: Set the event to be manually reset only so that the event isn't
resetting between each loop. The rest of the code was already written to
expect this behavior so no other changes should be necessary.
This commit is contained in:
Jaylyn Barbee
2025-10-10 06:51:38 -04:00
committed by GitHub
parent 1e3429dd3a
commit f44addb29c

View File

@@ -108,7 +108,7 @@ public:
m_force_light_event_handle = CreateDefaultEvent(L"POWERTOYS_LIGHTSWITCH_FORCE_LIGHT");
m_force_dark_event_handle = CreateDefaultEvent(L"POWERTOYS_LIGHTSWITCH_FORCE_DARK");
m_manual_override_event_handle = CreateDefaultEvent(L"POWERTOYS_LIGHTSWITCH_MANUAL_OVERRIDE");
m_manual_override_event_handle = CreateEventW(nullptr, TRUE, FALSE, L"POWERTOYS_LIGHTSWITCH_MANUAL_OVERRIDE");
init_settings();
};