diff options
author | George Hazan <george.hazan@gmail.com> | 2013-08-12 21:55:48 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-08-12 21:55:48 +0000 |
commit | 9f06e7ffdd6458dd25bfd5b915cb788bab03bea0 (patch) | |
tree | 28acaca0e311896ee60299e4ca055a5cc7a5cb3a /src/mir_core/miranda.cpp | |
parent | d60f928fe512a067719cfc6e9a88eb9d56ad47ac (diff) |
simple core logger
git-svn-id: http://svn.miranda-ng.org/main/trunk@5664 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/mir_core/miranda.cpp')
-rw-r--r-- | src/mir_core/miranda.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mir_core/miranda.cpp b/src/mir_core/miranda.cpp index 571bbb811a..1508e3f4e7 100644 --- a/src/mir_core/miranda.cpp +++ b/src/mir_core/miranda.cpp @@ -29,6 +29,10 @@ HWND hAPCWindow = NULL; int InitPathUtils(void);
void (*RecalculateTime)(void);
+void CheckLogs();
+void InitLogs();
+void UninitLogs();
+
int hLangpack = 0;
HINSTANCE hInst = 0;
@@ -47,8 +51,12 @@ static LRESULT CALLBACK APCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP return 0;
}
+ if (msg == WM_TIMER)
+ CheckLogs();
+
if (msg == WM_TIMECHANGE && RecalculateTime)
RecalculateTime();
+
return DefWindowProc(hwnd, msg, wParam, lParam);
}
@@ -68,6 +76,7 @@ static void LoadCoreModule(void) hAPCWindow = CreateWindowEx(0, _T("STATIC"), NULL, 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
SetWindowLongPtr(hAPCWindow, GWLP_WNDPROC, (LONG_PTR)APCWndProc);
+ SetTimer(hAPCWindow, 1, 60*1000, NULL);
hStackMutex = CreateMutex(NULL, FALSE, NULL);
hThreadQueueEmpty = CreateEvent(NULL, TRUE, TRUE, NULL);
@@ -79,6 +88,7 @@ static void LoadCoreModule(void) RecalculateTime = (void (*)()) GetProcAddress(mirInst, "RecalculateTime");
InitPathUtils();
+ InitLogs();
InitialiseModularEngine();
InitProtocols();
}
@@ -93,6 +103,7 @@ MIR_CORE_DLL(void) UnloadCoreModule(void) UninitSubclassing();
UninitProtocols();
DestroyModularEngine();
+ UninitLogs();
UnloadLangPackModule();
}
|