forked from len0rd/rockbox
Backlight handling: * Added 'Caption Backlight' and 'Backlight On When Charging' for the iriver remote LCD. * Enabled the backlight code for the simulator, and prepared backlight simulation. It's only a stub atm, writing messages to the console window. * Added tick task handling to the simulators for this to work. * Code cleanup in backlight.c, less dead code.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8034 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e68680ac31
commit
b51f7dfc9b
29 changed files with 416 additions and 231 deletions
|
@ -36,7 +36,8 @@
|
|||
|
||||
// extern functions
|
||||
extern void app_main (void *); // mod entry point
|
||||
extern void new_key(int key);
|
||||
extern void new_key(int key);
|
||||
extern void sim_tick_tasks(void);
|
||||
|
||||
void button_event(int key, bool pressed);
|
||||
|
||||
|
@ -67,12 +68,18 @@ LRESULT CALLBACK GUIWndProc (
|
|||
static HDC hMemDc;
|
||||
|
||||
static LARGE_INTEGER persec, tick1, ticknow;
|
||||
long new_tick;
|
||||
|
||||
switch (uMsg)
|
||||
{
|
||||
case WM_TIMER:
|
||||
QueryPerformanceCounter(&ticknow);
|
||||
current_tick = ((ticknow.QuadPart-tick1.QuadPart)*HZ)/persec.QuadPart;
|
||||
new_tick = ((ticknow.QuadPart-tick1.QuadPart)*HZ)/persec.QuadPart;
|
||||
if (new_tick != current_tick)
|
||||
{
|
||||
sim_tick_tasks();
|
||||
current_tick = new_tick;
|
||||
}
|
||||
return TRUE;
|
||||
case WM_ACTIVATE:
|
||||
if (LOWORD(wParam) == WA_ACTIVE || LOWORD(wParam) == WA_CLICKACTIVE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue