all repos — mgba @ 9464ec2afacec087c94a7cef74c04136d560b300

mGBA Game Boy Advance Emulator

Qt: Fix rewinding while paused
Jeffrey Pfau jeffrey@endrift.com
Mon, 29 Aug 2016 18:24:24 -0700
commit

9464ec2afacec087c94a7cef74c04136d560b300

parent

246efef6b960d51a6a0917d824558569cf2e6873

1 files changed, 3 insertions(+), 2 deletions(-)

jump to
M src/platform/qt/GameController.cppsrc/platform/qt/GameController.cpp

@@ -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 @@ }

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); }