Qt: Decrease early-sync timeout

This commit is contained in:
Vicki Pfau 2021-06-19 14:58:01 -07:00
parent 4eeadae8c5
commit e7aed37920
1 changed files with 2 additions and 2 deletions

View File

@ -444,12 +444,12 @@ void PainterGL::draw() {
m_delayTimer.start();
} else {
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);
}
forceRedraw = true;
} 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);