mirror of https://github.com/mgba-emu/mgba.git
Qt: Decrease early-sync timeout
This commit is contained in:
parent
645034a89e
commit
3a26c94eee
|
@ -444,12 +444,12 @@ void PainterGL::draw() {
|
||||||
m_delayTimer.start();
|
m_delayTimer.start();
|
||||||
} else {
|
} else {
|
||||||
if (sync->audioWait || sync->videoFrameWait) {
|
if (sync->audioWait || sync->videoFrameWait) {
|
||||||
while (m_delayTimer.nsecsElapsed() + 2000000 < 1000000000 / sync->fpsTarget) {
|
while (m_delayTimer.nsecsElapsed() + 1'000'000 < 1'000'000'000 / sync->fpsTarget) {
|
||||||
QThread::usleep(500);
|
QThread::usleep(500);
|
||||||
}
|
}
|
||||||
forceRedraw = true;
|
forceRedraw = true;
|
||||||
} else if (!forceRedraw) {
|
} else if (!forceRedraw) {
|
||||||
forceRedraw = m_delayTimer.nsecsElapsed() + 2000000 >= 1000000000 / m_surface->screen()->refreshRate();
|
forceRedraw = m_delayTimer.nsecsElapsed() + 1'000'000 >= 1'000'000'000 / m_surface->screen()->refreshRate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mCoreSyncWaitFrameEnd(sync);
|
mCoreSyncWaitFrameEnd(sync);
|
||||||
|
|
Loading…
Reference in New Issue