diff options
author | Miika Pekkarinen <miipekk@ihme.org> | 2006-07-31 15:02:39 +0000 |
---|---|---|
committer | Miika Pekkarinen <miipekk@ihme.org> | 2006-07-31 15:02:39 +0000 |
commit | 4222f6ce0d9bf19af0325d273b247127b6a3ef67 (patch) | |
tree | eca87226ed43e1235fea948d98aa07be4082a20e | |
parent | 9b514409f3b1a41d4436167d0a9b0b69d8601ecd (diff) | |
download | rockbox-4222f6ce0d9bf19af0325d273b247127b6a3ef67.tar.gz rockbox-4222f6ce0d9bf19af0325d273b247127b6a3ef67.zip |
Prevent the simulator SDL audio skipping under Linux.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10383 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | uisimulator/sdl/thread-sdl.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/uisimulator/sdl/thread-sdl.c b/uisimulator/sdl/thread-sdl.c index 587a5cc868..9377ba5219 100644 --- a/uisimulator/sdl/thread-sdl.c +++ b/uisimulator/sdl/thread-sdl.c | |||
@@ -32,8 +32,14 @@ SDL_mutex *m; | |||
32 | 32 | ||
33 | void yield(void) | 33 | void yield(void) |
34 | { | 34 | { |
35 | static int counter = 0; | ||
36 | |||
35 | SDL_mutexV(m); | 37 | SDL_mutexV(m); |
36 | SDL_Delay(1); | 38 | if (counter++ >= 5) |
39 | { | ||
40 | SDL_Delay(1); | ||
41 | counter = 0; | ||
42 | } | ||
37 | SDL_mutexP(m); | 43 | SDL_mutexP(m); |
38 | } | 44 | } |
39 | 45 | ||