all repos — mgba @ 0579ececb343b13c5be40dc4f1ce60fb5a8812c6

mGBA Game Boy Advance Emulator

Merge branch 'master' into qt
Jeffrey Pfau jeffrey@endrift.com
Wed, 15 Oct 2014 04:57:20 -0700
commit

0579ececb343b13c5be40dc4f1ce60fb5a8812c6

parent

ca128a97ea23221aa5bb62f343be12848f307e5b

1 files changed, 6 insertions(+), 4 deletions(-)

jump to
M src/gba/gba-thread.csrc/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);