Qt: Fix bounded fast forward with enhancement OpenGL renderer

This commit is contained in:
Vicki Pfau 2021-07-10 16:39:12 -07:00
parent 9eefc85b64
commit 3392f86dcb
2 changed files with 4 additions and 2 deletions

View File

@ -35,6 +35,7 @@ Other fixes:
- Qt: Fix crash in sprite view for partially out-of-bounds sprites (fixes mgba.io/i/2165)
- Qt: Fix having to press controller buttons twice for menu items (fixes mgba.io/i/2143)
- Qt: Redo sensor binding to be less fragile
- Qt: Fix bounded fast forward with enhancement OpenGL renderer
- Util: Fix loading UPS patches that affect the last byte of the file
Misc:
- Core: Suspend runloop when a core crashes

View File

@ -460,8 +460,9 @@ void PainterGL::draw() {
while (m_delayTimer.nsecsElapsed() + 1'000'000 < 1'000'000'000 / sync->fpsTarget) {
QThread::usleep(500);
}
forceRedraw = true;
} else if (!forceRedraw) {
forceRedraw = sync->videoFrameWait;
}
if (!forceRedraw) {
forceRedraw = m_delayTimer.nsecsElapsed() + 1'000'000 >= 1'000'000'000 / m_surface->screen()->refreshRate();
}
}