Merge branch 'master' into qt

This commit is contained in:
Jeffrey Pfau 2014-10-15 04:57:20 -07:00
commit 0579ececb3
1 changed files with 6 additions and 4 deletions

View File

@ -520,10 +520,12 @@ void GBASyncPostFrame(struct GBASync* sync) {
++sync->videoFramePending; ++sync->videoFramePending;
--sync->videoFrameSkip; --sync->videoFrameSkip;
if (sync->videoFrameSkip < 0) { if (sync->videoFrameSkip < 0) {
ConditionWake(&sync->videoFrameAvailableCond); do {
while (sync->videoFrameWait && sync->videoFramePending) { ConditionWake(&sync->videoFrameAvailableCond);
ConditionWait(&sync->videoFrameRequiredCond, &sync->videoFrameMutex); if (sync->videoFrameWait) {
} ConditionWait(&sync->videoFrameRequiredCond, &sync->videoFrameMutex);
}
} while (sync->videoFrameWait && sync->videoFramePending);
} }
MutexUnlock(&sync->videoFrameMutex); MutexUnlock(&sync->videoFrameMutex);