diff options
Diffstat (limited to 'uisimulator')
-rw-r--r-- | uisimulator/sdl/thread-sdl.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/uisimulator/sdl/thread-sdl.c b/uisimulator/sdl/thread-sdl.c index ea8bb39360..0bd7d2534e 100644 --- a/uisimulator/sdl/thread-sdl.c +++ b/uisimulator/sdl/thread-sdl.c | |||
@@ -225,17 +225,10 @@ void thread_sdl_unlock(void) | |||
225 | 225 | ||
226 | void switch_thread(bool save_context, struct thread_entry **blocked_list) | 226 | void switch_thread(bool save_context, struct thread_entry **blocked_list) |
227 | { | 227 | { |
228 | static int counter = 0; | ||
229 | struct thread_entry *current = running; | 228 | struct thread_entry *current = running; |
230 | 229 | ||
231 | SDL_UnlockMutex(m); | 230 | SDL_UnlockMutex(m); |
232 | 231 | /* Any other thread waiting already will get it first */ | |
233 | if (counter++ >= 50) | ||
234 | { | ||
235 | SDL_Delay(0); | ||
236 | counter = 0; | ||
237 | } | ||
238 | |||
239 | SDL_LockMutex(m); | 232 | SDL_LockMutex(m); |
240 | running = current; | 233 | running = current; |
241 | 234 | ||