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:
parent
9b514409f3
commit
4222f6ce0d
1 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue