mirror of https://github.com/mgba-emu/mgba.git
Merge branch 'master' into qt
This commit is contained in:
commit
0579ececb3
|
@ -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) {
|
||||||
|
do {
|
||||||
ConditionWake(&sync->videoFrameAvailableCond);
|
ConditionWake(&sync->videoFrameAvailableCond);
|
||||||
while (sync->videoFrameWait && sync->videoFramePending) {
|
if (sync->videoFrameWait) {
|
||||||
ConditionWait(&sync->videoFrameRequiredCond, &sync->videoFrameMutex);
|
ConditionWait(&sync->videoFrameRequiredCond, &sync->videoFrameMutex);
|
||||||
}
|
}
|
||||||
|
} while (sync->videoFrameWait && sync->videoFramePending);
|
||||||
}
|
}
|
||||||
MutexUnlock(&sync->videoFrameMutex);
|
MutexUnlock(&sync->videoFrameMutex);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue