diff options
| author | Michael Sevakis <jethead71@rockbox.org> | 2008-10-27 17:26:58 +0000 |
|---|---|---|
| committer | Michael Sevakis <jethead71@rockbox.org> | 2008-10-27 17:26:58 +0000 |
| commit | 4ce3eb2453254fc2b35bc54dc0d414005a997f15 (patch) | |
| tree | d5d1658823180e71aea9452138d04a662ee8bcb9 | |
| parent | 623cd1cb0dcb78b2dfc92e50de34b1d72737c3d8 (diff) | |
| download | rockbox-4ce3eb2453254fc2b35bc54dc0d414005a997f15.zip rockbox-4ce3eb2453254fc2b35bc54dc0d414005a997f15.tar.gz rockbox-4ce3eb2453254fc2b35bc54dc0d414005a997f15.tar.bz2 rockbox-4ce3eb2453254fc2b35bc54dc0d414005a997f15.tar.xz | |
The tick change for the sim can be a little nicer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18895 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | uisimulator/sdl/kernel-sdl.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/uisimulator/sdl/kernel-sdl.c b/uisimulator/sdl/kernel-sdl.c index 2ff18b3..3288a6f 100644 --- a/uisimulator/sdl/kernel-sdl.c +++ b/uisimulator/sdl/kernel-sdl.c @@ -125,18 +125,15 @@ Uint32 tick_timer(Uint32 interval, void *param) new_tick = (SDL_GetTicks() - start_tick) / (1000/HZ); - if(new_tick != current_tick) + while(new_tick != current_tick) { - while(current_tick < new_tick) - { - sim_enter_irq_handler(); + sim_enter_irq_handler(); - /* Run through the list of tick tasks - increments tick - * on each iteration. */ - call_tick_tasks(); + /* Run through the list of tick tasks - increments tick + * on each iteration. */ + call_tick_tasks(); - sim_exit_irq_handler(); - } + sim_exit_irq_handler(); } return 1; |