Merge branch 'master' into qt
Jeffrey Pfau jeffrey@endrift.com
Wed, 15 Oct 2014 04:57:20 -0700
1 files changed,
6 insertions(+),
4 deletions(-)
jump to
M
src/gba/gba-thread.c
→
src/gba/gba-thread.c
@@ -520,10 +520,12 @@ MutexLock(&sync->videoFrameMutex);
++sync->videoFramePending; --sync->videoFrameSkip; if (sync->videoFrameSkip < 0) { - ConditionWake(&sync->videoFrameAvailableCond); - while (sync->videoFrameWait && sync->videoFramePending) { - ConditionWait(&sync->videoFrameRequiredCond, &sync->videoFrameMutex); - } + do { + ConditionWake(&sync->videoFrameAvailableCond); + if (sync->videoFrameWait) { + ConditionWait(&sync->videoFrameRequiredCond, &sync->videoFrameMutex); + } + } while (sync->videoFrameWait && sync->videoFramePending); } MutexUnlock(&sync->videoFrameMutex);