Qt: Fix rewinding while paused

This commit is contained in:
Jeffrey Pfau 2016-08-29 18:24:24 -07:00
parent 246efef6b9
commit 9464ec2afa
1 changed files with 3 additions and 2 deletions

View File

@ -573,6 +573,7 @@ void GameController::setPaused(bool paused) {
if (!isLoaded() || paused == mCoreThreadIsPaused(&m_threadContext)) {
return;
}
m_wasPaused = paused;
if (paused) {
m_pauseAfterFrame.testAndSetRelaxed(false, true);
} else {
@ -646,9 +647,9 @@ void GameController::startRewinding() {
if (m_multiplayer && m_multiplayer->attached() > 1) {
return;
}
m_wasPaused = mCoreThreadIsPaused(&m_threadContext);
if (m_wasPaused) {
mCoreThreadUnpause(&m_threadContext);
setPaused(false);
m_wasPaused = true;
}
mCoreThreadSetRewinding(&m_threadContext, true);
}