From 23f0b751b57b2dd9f6e912cec92364ff59b864b2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 9 Sep 2021 22:24:07 +0300 Subject: fix for a crappy ::GetCurrentThread call that breaks all Wait* functions --- plugins/KeyboardNotify/src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/KeyboardNotify/src') diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index 321aa68a9e..322ba0ec93 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -266,7 +266,7 @@ static void __cdecl FlashThreadFunction(void*) BYTE data, unchangedLeds; Thread_SetName("KeyboardNotify: FlashThreadFunction"); - MThreadHandle threadLock(hThread); + MThreadLock threadLock(hThread); while (true) { unchangedLeds = (BYTE)(LedState(VK_PAUSE) * !bFlashLed[2] + ((LedState(VK_NUMLOCK) * !bFlashLed[0]) << 1) + ((LedState(VK_CAPITAL) * !bFlashLed[1]) << 2)); @@ -903,7 +903,7 @@ static int ModulesLoaded(WPARAM, LPARAM) mir_snwprintf(eventName, L"%s/ExitEvent", eventPrefix); hExitEvent = CreateEvent(nullptr, FALSE, FALSE, eventName); - mir_forkthread(FlashThreadFunction); + hThread = mir_forkthread(FlashThreadFunction); CreateServiceFunction(MS_KBDNOTIFY_ENABLE, EnableService); CreateServiceFunction(MS_KBDNOTIFY_DISABLE, DisableService); -- cgit v1.2.3