From 99b0796eb6cd0bcc7d7facdd1a1a6834cca588dd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 11 Mar 2013 13:43:44 +0000 Subject: various mir_forkthread quirks git-svn-id: http://svn.miranda-ng.org/main/trunk@3975 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AVS/src/main.cpp | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'plugins/AVS/src/main.cpp') diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index 7e21146fca..2cc5b49c40 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -33,7 +33,7 @@ static long hwndSetMyAvatar = 0; static HANDLE hMyAvatarsFolder; static HANDLE hGlobalAvatarFolder; -static HANDLE hLoaderEvent, hLoaderThread; +static HANDLE hLoaderEvent; HANDLE hEventChanged, hEventContactAvatarChanged, hMyAvatarChanged; HICON g_hIcon = 0; @@ -1986,8 +1986,7 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) mir_sntprintf(szEventName, 100, _T("avs_loaderthread_%d"), GetCurrentThreadId()); hLoaderEvent = CreateEvent(NULL, TRUE, FALSE, szEventName); - hLoaderThread = (HANDLE) mir_forkthread(PicLoader, 0); - SetThreadPriority(hLoaderThread, THREAD_PRIORITY_IDLE); + SetThreadPriority( mir_forkthread(PicLoader, 0), THREAD_PRIORITY_IDLE); // Folders plugin support hMyAvatarsFolder = FoldersRegisterCustomPathT(LPGEN("Avatars"), LPGEN("My Avatars"), MIRANDA_USERDATAT _T("\\Avatars")); @@ -2004,17 +2003,16 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) PROTOACCOUNT **accs = NULL; int accCount; - ProtoEnumAccounts( &accCount, &accs ); + ProtoEnumAccounts(&accCount, &accs); - if ( fei != NULL ) - { + if ( fei != NULL ) { LoadDefaultInfo(); PROTOCOLDESCRIPTOR** proto; int protoCount; CallService(MS_PROTO_ENUMPROTOS, ( WPARAM )&protoCount, ( LPARAM )&proto); - for ( i=0; i < protoCount; i++ ) + for (i=0; i < protoCount; i++ ) LoadProtoInfo( proto[i] ); - for(i = 0; i < accCount; i++) + for (i=0; i < accCount; i++) LoadAccountInfo( accs[i] ); } @@ -2048,9 +2046,9 @@ static void ReloadMyAvatar(LPVOID lpParam) continue; } - } else if (lstrcmpA(myAvatarProto, szProto)) { - continue; } + else if (lstrcmpA(myAvatarProto, szProto)) + continue; if (g_MyAvatars[i].hbmPic) DeleteObject(g_MyAvatars[i].hbmPic); -- cgit v1.2.3