diff options
Diffstat (limited to 'uisimulator/sdl/kernel-sdl.c')
-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 2ff18b33ee..3288a6f97a 100644 --- a/uisimulator/sdl/kernel-sdl.c +++ b/uisimulator/sdl/kernel-sdl.c | |||
@@ -125,18 +125,15 @@ Uint32 tick_timer(Uint32 interval, void *param) | |||
125 | 125 | ||
126 | new_tick = (SDL_GetTicks() - start_tick) / (1000/HZ); | 126 | new_tick = (SDL_GetTicks() - start_tick) / (1000/HZ); |
127 | 127 | ||
128 | if(new_tick != current_tick) | 128 | while(new_tick != current_tick) |
129 | { | 129 | { |
130 | while(current_tick < new_tick) | 130 | sim_enter_irq_handler(); |
131 | { | ||
132 | sim_enter_irq_handler(); | ||
133 | 131 | ||
134 | /* Run through the list of tick tasks - increments tick | 132 | /* Run through the list of tick tasks - increments tick |
135 | * on each iteration. */ | 133 | * on each iteration. */ |
136 | call_tick_tasks(); | 134 | call_tick_tasks(); |
137 | 135 | ||
138 | sim_exit_irq_handler(); | 136 | sim_exit_irq_handler(); |
139 | } | ||
140 | } | 137 | } |
141 | 138 | ||
142 | return 1; | 139 | return 1; |