summaryrefslogtreecommitdiff
path: root/plugins/KeyboardNotify/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2021-09-09 22:24:07 +0300
committerGeorge Hazan <ghazan@miranda.im>2021-09-09 22:24:07 +0300
commit23f0b751b57b2dd9f6e912cec92364ff59b864b2 (patch)
tree9b38146c3602b5300856d00bedfc248bce5c7da0 /plugins/KeyboardNotify/src
parent77a3554616362939d78649fd257f65e464312e68 (diff)
fix for a crappy ::GetCurrentThread call that breaks all Wait* functions
Diffstat (limited to 'plugins/KeyboardNotify/src')
-rw-r--r--plugins/KeyboardNotify/src/main.cpp4
1 files changed, 2 insertions, 2 deletions
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);