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.zip rockbox-4222f6ce0d9bf19af0325d273b247127b6a3ef67.tar.gz rockbox-4222f6ce0d9bf19af0325d273b247127b6a3ef67.tar.bz2 rockbox-4222f6ce0d9bf19af0325d273b247127b6a3ef67.tar.xz | |
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 587a5cc..9377ba5 100644 --- a/uisimulator/sdl/thread-sdl.c +++ b/uisimulator/sdl/thread-sdl.c @@ -32,8 +32,14 @@ SDL_mutex *m; void yield(void) { + static int counter = 0; + SDL_mutexV(m); - SDL_Delay(1); + if (counter++ >= 5) + { + SDL_Delay(1); + counter = 0; + } SDL_mutexP(m); } |