forked from len0rd/rockbox
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
This commit is contained in:
parent
623cd1cb0d
commit
4ce3eb2453
1 changed files with 6 additions and 9 deletions
|
@ -125,18 +125,15 @@ Uint32 tick_timer(Uint32 interval, void *param)
|
||||||
|
|
||||||
new_tick = (SDL_GetTicks() - start_tick) / (1000/HZ);
|
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
|
/* Run through the list of tick tasks - increments tick
|
||||||
* on each iteration. */
|
* on each iteration. */
|
||||||
call_tick_tasks();
|
call_tick_tasks();
|
||||||
|
|
||||||
sim_exit_irq_handler();
|
sim_exit_irq_handler();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue