summaryrefslogtreecommitdiff
path: root/uisimulator/sdl/uisdl.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-09-09 01:59:07 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-09-09 01:59:07 +0000
commit0107dfc8276d73744bb097d643809205ef21d97b (patch)
tree17d434f51652d949d8167abaf85fe0eacd33612a /uisimulator/sdl/uisdl.c
parent424750ea95409c6e78188aa47fe7a0f47d1127cb (diff)
downloadrockbox-0107dfc8276d73744bb097d643809205ef21d97b.tar.gz
rockbox-0107dfc8276d73744bb097d643809205ef21d97b.zip
UISIMULATOR: Give the host OS some needed context switching hints (which _is_ supposed to work on Linux - but I can't tell on VMWare - and does on Windows). I guess I'll know for sure soon. Give sleep() even more genuine behavior. Add some button driver sync with the rockbox threads that should have been there for some time - this is basically interrupt-like processing as any thread not in the kernel pool should be considered. Make the screendump work again by posting the request. Perhaps help out shutting down for some users but not in the way I'd prefer - to think about.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14646 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/sdl/uisdl.c')
-rw-r--r--uisimulator/sdl/uisdl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/uisimulator/sdl/uisdl.c b/uisimulator/sdl/uisdl.c
index 37a0e6fe7a..fdd40beb23 100644
--- a/uisimulator/sdl/uisdl.c
+++ b/uisimulator/sdl/uisdl.c
@@ -41,8 +41,8 @@
41extern void app_main (void *); /* mod entry point */ 41extern void app_main (void *); /* mod entry point */
42extern void new_key(int key); 42extern void new_key(int key);
43extern void sim_tick_tasks(void); 43extern void sim_tick_tasks(void);
44extern void sim_io_init(void); 44extern void sim_io_init(void);
45extern void sim_io_shutdown(void); 45extern void sim_io_shutdown(void);
46 46
47void button_event(int key, bool pressed); 47void button_event(int key, bool pressed);
48 48
@@ -69,7 +69,7 @@ Uint32 tick_timer(Uint32 interval, void *param)
69 (void) interval; 69 (void) interval;
70 (void) param; 70 (void) param;
71 71
72 new_tick = (SDL_GetTicks() - start_tick) * HZ / 1000; 72 new_tick = (SDL_GetTicks() - start_tick) / (1000/HZ);
73 73
74 if (new_tick != current_tick) { 74 if (new_tick != current_tick) {
75 long i; 75 long i;