summaryrefslogtreecommitdiffstats
path: root/uisimulator/win32
diff options
context:
space:
mode:
Diffstat (limited to 'uisimulator/win32')
-rw-r--r--uisimulator/win32/thread-win32.c1
-rw-r--r--uisimulator/win32/uisw32.c6
-rw-r--r--uisimulator/win32/uisw32.h1
-rw-r--r--uisimulator/win32/uisw32.suobin12800 -> 12800 bytes
-rw-r--r--uisimulator/win32/uisw32.vcproj2
5 files changed, 9 insertions, 1 deletions
diff --git a/uisimulator/win32/thread-win32.c b/uisimulator/win32/thread-win32.c
index 466567c535..2ad356c62f 100644
--- a/uisimulator/win32/thread-win32.c
+++ b/uisimulator/win32/thread-win32.c
@@ -23,6 +23,7 @@
HANDLE lpThreads[256];
int nThreads = 0,
nPos = 0;
+long current_tick = 0;
DWORD WINAPI runthread (LPVOID lpParameter)
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;
diff --git a/uisimulator/win32/uisw32.h b/uisimulator/win32/uisw32.h
index fd778e9182..7b38c76987 100644
--- a/uisimulator/win32/uisw32.h
+++ b/uisimulator/win32/uisw32.h
@@ -33,6 +33,7 @@
#define UI_LCD_POSY 95 // y position of lcd
#define TM_YIELD WM_USER + 101 // thread message for yield
+#define TIMER_EVENT 0x34928340
extern HWND hGUIWnd; // the GUI window handle
extern unsigned int uThreadID; // id of mod thread
diff --git a/uisimulator/win32/uisw32.suo b/uisimulator/win32/uisw32.suo
index b18805cf4a..569c42b853 100644
--- a/uisimulator/win32/uisw32.suo
+++ b/uisimulator/win32/uisw32.suo
Binary files differ
diff --git a/uisimulator/win32/uisw32.vcproj b/uisimulator/win32/uisw32.vcproj
index 99222a64a8..c3429a4871 100644
--- a/uisimulator/win32/uisw32.vcproj
+++ b/uisimulator/win32/uisw32.vcproj
@@ -20,7 +20,7 @@
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""C:\Programming\CVS Checkout\RockBox\apps\recorder";"C:\Programming\CVS Checkout\RockBox\apps";"C:\Programming\CVS Checkout\RockBox\firmware";"C:\Programming\CVS Checkout\RockBox\uisimulator\win32";"C:\Programming\CVS Checkout\RockBox\firmware\drivers";"C:\Programming\CVS Checkout\RockBox\firmware\common""
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;HAVE_PLAYER_KEYPAD;HAVE_LCD_CHARCELLS;SIMULATOR;SIMULATOR;"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;HAVE_RECORDER_KEYPAD;HAVE_LCD_BITMAP;SIMULATOR;SIMULATOR;"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"