mirror of https://github.com/mgba-emu/mgba.git
Revert "Qt: More Windows frame-pacing fixes"
This reverts commit 5b3fea3038
.
This commit is contained in:
parent
65886b02f4
commit
ff95aab0b9
|
@ -644,9 +644,6 @@ void PainterGL::draw() {
|
||||||
|
|
||||||
if (!mCoreSyncWaitFrameStart(sync)) {
|
if (!mCoreSyncWaitFrameStart(sync)) {
|
||||||
mCoreSyncWaitFrameEnd(sync);
|
mCoreSyncWaitFrameEnd(sync);
|
||||||
if (m_timerResidue > targetNsec) {
|
|
||||||
m_timerResidue %= targetNsec;
|
|
||||||
}
|
|
||||||
if (!sync->audioWait && !sync->videoFrameWait) {
|
if (!sync->audioWait && !sync->videoFrameWait) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -658,13 +655,13 @@ void PainterGL::draw() {
|
||||||
dequeue();
|
dequeue();
|
||||||
bool forceRedraw = !m_videoProxy;
|
bool forceRedraw = !m_videoProxy;
|
||||||
if (sync->audioWait || sync->videoFrameWait) {
|
if (sync->audioWait || sync->videoFrameWait) {
|
||||||
while (delay + m_overage + m_delayTimer.nsecsElapsed() + OVERHEAD_NSEC < targetNsec) {
|
while (delay + m_delayTimer.nsecsElapsed() + OVERHEAD_NSEC < targetNsec) {
|
||||||
QThread::usleep(200);
|
QThread::usleep(200);
|
||||||
}
|
}
|
||||||
forceRedraw = sync->videoFrameWait;
|
forceRedraw = sync->videoFrameWait;
|
||||||
}
|
}
|
||||||
if (!forceRedraw) {
|
if (!forceRedraw) {
|
||||||
forceRedraw = delay + m_overage + m_delayTimer.nsecsElapsed() + OVERHEAD_NSEC >= refreshNsec;
|
forceRedraw = delay + m_delayTimer.nsecsElapsed() + OVERHEAD_NSEC >= refreshNsec;
|
||||||
}
|
}
|
||||||
mCoreSyncWaitFrameEnd(sync);
|
mCoreSyncWaitFrameEnd(sync);
|
||||||
|
|
||||||
|
@ -673,8 +670,7 @@ void PainterGL::draw() {
|
||||||
m_delayTimer.restart();
|
m_delayTimer.restart();
|
||||||
|
|
||||||
delay -= targetNsec;
|
delay -= targetNsec;
|
||||||
m_overage = (m_overage + delay) / 2;
|
m_timerResidue = (m_timerResidue + delay) / 2;
|
||||||
m_timerResidue = delay;
|
|
||||||
|
|
||||||
if (m_timerResidue > refreshNsec) {
|
if (m_timerResidue > refreshNsec) {
|
||||||
if (!m_drawTimer.isActive()) {
|
if (!m_drawTimer.isActive()) {
|
||||||
|
|
|
@ -196,7 +196,6 @@ private:
|
||||||
bool m_started = false;
|
bool m_started = false;
|
||||||
QTimer m_drawTimer;
|
QTimer m_drawTimer;
|
||||||
qint64 m_timerResidue;
|
qint64 m_timerResidue;
|
||||||
qint64 m_overage;
|
|
||||||
std::shared_ptr<CoreController> m_context;
|
std::shared_ptr<CoreController> m_context;
|
||||||
CoreController::Interrupter m_interrupter;
|
CoreController::Interrupter m_interrupter;
|
||||||
bool m_supportsShaders;
|
bool m_supportsShaders;
|
||||||
|
|
Loading…
Reference in New Issue