From 25221b7d2afb70f82eb3805330fd39a6f6708049 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 Jun 2012 23:41:55 +0000 Subject: mk: removed all LIST_INTERFACE, MI_INTERFACE & UTF8_INTERFACE instances. all related functions moved to mir_core. git-svn-id: http://svn.miranda-ng.org/main/trunk@644 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/mir_core/miranda.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'plugins/mir_core/miranda.cpp') diff --git a/plugins/mir_core/miranda.cpp b/plugins/mir_core/miranda.cpp index 1e714089d1..7f48e05bb2 100644 --- a/plugins/mir_core/miranda.cpp +++ b/plugins/mir_core/miranda.cpp @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. HWND hAPCWindow = NULL; int InitPathUtils(void); -void RecalculateTime(void); +void (*RecalculateTime)(void); HANDLE hStackMutex, hThreadQueueEmpty; int hLangpack = 0; @@ -345,7 +345,8 @@ MIR_CORE_DLL(INT_PTR) UnwindThreadPop(WPARAM, LPARAM) static LRESULT CALLBACK APCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) { if (msg == WM_NULL) SleepEx(0, TRUE); - if (msg == WM_TIMECHANGE) RecalculateTime(); + if (msg == WM_TIMECHANGE && RecalculateTime) + RecalculateTime(); return DefWindowProc(hwnd, msg, wParam, lParam); } @@ -370,17 +371,21 @@ static void LoadSystemModule(void) SetWindowLongPtr(hAPCWindow, GWLP_WNDPROC, (LONG_PTR)APCWndProc); hStackMutex = CreateMutex(NULL, FALSE, NULL); + #ifdef WIN64 + HMODULE mirInst = GetModuleHandleA("miranda64.exe"); + #else + HMODULE mirInst = GetModuleHandleA("miranda32.exe"); + #endif + RecalculateTime = (void (*)()) GetProcAddress(mirInst, "RecalculateTime"); + InitPathUtils(); - LoadLangPackModule(); InitialiseModularEngine(); - InitTimeZones(); } static void UnloadSystemModule(void) { DestroyModularEngine(); UnloadLangPackModule(); - UninitTimeZones(); } ///////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3