From 5e3980529e772bf4bb701822f6cde9b3bb117cb8 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Mon, 11 May 2015 14:47:47 +0000 Subject: minus CreateThread git-svn-id: http://svn.miranda-ng.org/main/trunk@13536 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/KeyboardNotify/src/flash.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'plugins/KeyboardNotify/src/flash.cpp') diff --git a/plugins/KeyboardNotify/src/flash.cpp b/plugins/KeyboardNotify/src/flash.cpp index bac58a276a..22a86b2d63 100644 --- a/plugins/KeyboardNotify/src/flash.cpp +++ b/plugins/KeyboardNotify/src/flash.cpp @@ -31,7 +31,7 @@ FLASHING_SEQUENCE *getCustomSeq(void); FLASHING_SEQUENCE *getPredefinedSeq(void); FLASHING_SEQUENCE *getTrillianSeq(void); void updateTrillianSeq(void); -static void TestThread(FLASHING_SEQUENCE *); +static void __cdecl TestThread(void *param); static void PreviewThread(void *); FLASHING_SEQUENCE str2FS(TCHAR *); BYTE KbdChar2Byte(char); @@ -310,13 +310,13 @@ void testSequence(TCHAR *testStr) static FLASHING_SEQUENCE Test = {0}; Test = str2FS(testStr); - DWORD threadID = 0; - CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)TestThread, &Test, 0, &threadID); + mir_forkthread(TestThread, (void*)&Test); } -static void TestThread(FLASHING_SEQUENCE *pTest) +static void __cdecl TestThread(void *param) { + FLASHING_SEQUENCE *pTest = (FLASHING_SEQUENCE *)param; unsigned int testNum = (unsigned int)db_get_b(NULL, KEYBDMODULE, "testnum", DEF_SETTING_TESTNUM); unsigned int testSecs = (unsigned int)db_get_b(NULL, KEYBDMODULE, "testsecs", DEF_SETTING_TESTSECS); @@ -339,8 +339,7 @@ void previewFlashing(BOOL buttonState) return; bPreviewSemaphore = TRUE; - DWORD threadID = 0; - CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)PreviewThread, NULL, 0, &threadID); + mir_forkthread(PreviewThread, 0); } -- cgit v1.2.3