Prevent the simulator SDL audio skipping under Linux.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10383 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Miika Pekkarinen 2006-07-31 15:02:39 +00:00
parent 9b514409f3
commit 4222f6ce0d

View file

@ -32,8 +32,14 @@ SDL_mutex *m;
void yield(void)
{
static int counter = 0;
SDL_mutexV(m);
if (counter++ >= 5)
{
SDL_Delay(1);
counter = 0;
}
SDL_mutexP(m);
}