defined current_tick variable and repaired broken build.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1008 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Felix Arends 2002-06-15 10:58:14 +00:00
parent 2d29a7431f
commit 07079466b3
5 changed files with 9 additions and 1 deletions

View file

@ -23,6 +23,7 @@
HANDLE lpThreads[256];
int nThreads = 0,
nPos = 0;
long current_tick = 0;
DWORD WINAPI runthread (LPVOID lpParameter)

View file

@ -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;

View file

@ -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

Binary file not shown.

View file

@ -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"