Use locking on idle wait cond

This commit is contained in:
uyjulian 2020-01-22 02:35:48 -06:00
parent 63ddee1be1
commit cfcfde0480
No known key found for this signature in database
GPG Key ID: FEA459A8CA14685B
1 changed files with 10 additions and 2 deletions

View File

@ -386,8 +386,16 @@ void idle_wait(void)
void idle_resume(void)
{
//This causes events to not process randomly in JIT so commented out
if (idle_cond)
SDL_CondSignal(idle_cond);
if (idle_lock)
{
SDL_LockMutex(idle_lock);
if (idle_cond)
{
SDL_CondSignal(idle_cond);
}
SDL_UnlockMutex(idle_lock);
}
// #ifdef IDLE_USES_COND_WAIT
// pthread_cond_signal(&idle_cond);
// #else