From f44addb29c3c9c867ed1b80c1753cf2adfa24795 Mon Sep 17 00:00:00 2001 From: Jaylyn Barbee <51131738+Jaylyn-Barbee@users.noreply.github.com> Date: Fri, 10 Oct 2025 06:51:38 -0400 Subject: [PATCH] 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. --- src/modules/LightSwitch/LightSwitchModuleInterface/dllmain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/LightSwitch/LightSwitchModuleInterface/dllmain.cpp b/src/modules/LightSwitch/LightSwitchModuleInterface/dllmain.cpp index be3afb170d..4e95555a5a 100644 --- a/src/modules/LightSwitch/LightSwitchModuleInterface/dllmain.cpp +++ b/src/modules/LightSwitch/LightSwitchModuleInterface/dllmain.cpp @@ -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(); };