mirror of https://github.com/mgba-emu/mgba.git
Qt: Tighten OpenGL timing variance
This commit is contained in:
parent
b6e2faaba9
commit
506424286f
|
@ -612,13 +612,13 @@ void PainterGL::draw() {
|
|||
m_delayTimer.start();
|
||||
} else {
|
||||
if (sync->audioWait || sync->videoFrameWait) {
|
||||
while (m_delayTimer.nsecsElapsed() + 1000000 < 1000000000 / sync->fpsTarget) {
|
||||
while (m_delayTimer.nsecsElapsed() + 300000 < 1000000000 / sync->fpsTarget) {
|
||||
QThread::usleep(500);
|
||||
}
|
||||
forceRedraw = sync->videoFrameWait;
|
||||
}
|
||||
if (!forceRedraw) {
|
||||
forceRedraw = m_delayTimer.nsecsElapsed() + 1000000 >= 1000000000 / m_window->screen()->refreshRate();
|
||||
forceRedraw = m_delayTimer.nsecsElapsed() + 300000 >= 1000000000 / m_window->screen()->refreshRate();
|
||||
}
|
||||
}
|
||||
mCoreSyncWaitFrameEnd(sync);
|
||||
|
|
Loading…
Reference in New Issue