summaryrefslogtreecommitdiffstats
path: root/uisimulator/win32/uisw32.c
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/win32/uisw32.c')
-rw-r--r--uisimulator/win32/uisw32.c6
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 @@
#include "button.h"
#include "thread.h"
#include "thread-win32.h"
+#include "kernel.h"
// extern functions
extern void app_main (void *); // mod entry point
@@ -51,6 +52,9 @@ LRESULT GUIWndProc (
switch (uMsg)
{
+ case WM_TIMER:
+ current_tick++;
+ return TRUE;
case WM_ACTIVATE:
if (LOWORD(wParam) == WA_ACTIVE || LOWORD(wParam) == WA_CLICKACTIVE)
bActive = true;
@@ -58,6 +62,7 @@ LRESULT GUIWndProc (
bActive = false;
return TRUE;
case WM_CREATE:
+ SetTimer (hWnd, TIMER_EVENT, 50, NULL);
// load background image
hBkgnd = (HBITMAP)LoadImage (GetModuleHandle (NULL), MAKEINTRESOURCE(IDB_UI),
IMAGE_BITMAP, 0, 0, LR_VGACOLOR);
@@ -186,6 +191,7 @@ LRESULT GUIWndProc (
}
case WM_CLOSE:
// close simulator
+ KillTimer (hWnd, TIMER_EVENT);
hGUIWnd = NULL;
PostQuitMessage (0);
break;