diff options
Diffstat (limited to 'uisimulator/win32/uisw32.c')
-rw-r--r-- | uisimulator/win32/uisw32.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/uisimulator/win32/uisw32.c b/uisimulator/win32/uisw32.c index 77ad917461..2661d74cb0 100644 --- a/uisimulator/win32/uisw32.c +++ b/uisimulator/win32/uisw32.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include "button.h" | 24 | #include "button.h" |
25 | #include "thread.h" | 25 | #include "thread.h" |
26 | #include "thread-win32.h" | 26 | #include "thread-win32.h" |
27 | #include "kernel.h" | ||
27 | 28 | ||
28 | // extern functions | 29 | // extern functions |
29 | extern void app_main (void *); // mod entry point | 30 | extern void app_main (void *); // mod entry point |
@@ -51,6 +52,9 @@ LRESULT GUIWndProc ( | |||
51 | 52 | ||
52 | switch (uMsg) | 53 | switch (uMsg) |
53 | { | 54 | { |
55 | case WM_TIMER: | ||
56 | current_tick++; | ||
57 | return TRUE; | ||
54 | case WM_ACTIVATE: | 58 | case WM_ACTIVATE: |
55 | if (LOWORD(wParam) == WA_ACTIVE || LOWORD(wParam) == WA_CLICKACTIVE) | 59 | if (LOWORD(wParam) == WA_ACTIVE || LOWORD(wParam) == WA_CLICKACTIVE) |
56 | bActive = true; | 60 | bActive = true; |
@@ -58,6 +62,7 @@ LRESULT GUIWndProc ( | |||
58 | bActive = false; | 62 | bActive = false; |
59 | return TRUE; | 63 | return TRUE; |
60 | case WM_CREATE: | 64 | case WM_CREATE: |
65 | SetTimer (hWnd, TIMER_EVENT, 50, NULL); | ||
61 | // load background image | 66 | // load background image |
62 | hBkgnd = (HBITMAP)LoadImage (GetModuleHandle (NULL), MAKEINTRESOURCE(IDB_UI), | 67 | hBkgnd = (HBITMAP)LoadImage (GetModuleHandle (NULL), MAKEINTRESOURCE(IDB_UI), |
63 | IMAGE_BITMAP, 0, 0, LR_VGACOLOR); | 68 | IMAGE_BITMAP, 0, 0, LR_VGACOLOR); |
@@ -186,6 +191,7 @@ LRESULT GUIWndProc ( | |||
186 | } | 191 | } |
187 | case WM_CLOSE: | 192 | case WM_CLOSE: |
188 | // close simulator | 193 | // close simulator |
194 | KillTimer (hWnd, TIMER_EVENT); | ||
189 | hGUIWnd = NULL; | 195 | hGUIWnd = NULL; |
190 | PostQuitMessage (0); | 196 | PostQuitMessage (0); |
191 | break; | 197 | break; |