From 6dbe1f10f2b579b077bb0dbc3b22ba45ec14e8b1 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Tue, 15 Dec 2015 22:13:19 -0800 Subject: [PATCH] Qt: Fix resetting while paused --- CHANGES | 1 + src/platform/qt/GameController.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGES b/CHANGES index a39d04d73..e9c7c0fe3 100644 --- a/CHANGES +++ b/CHANGES @@ -26,6 +26,7 @@ Bugfixes: - ARM7: Fix bank switching with LDR[B]T/STR[B]T - Qt: Fix crash when closing multiplayer windows - GBA Video: Fix OAM and palette initialization + - Qt: Fix resetting while paused Misc: - GBA Audio: Implement missing flags on SOUNDCNT_X register - Qt: Add mute option to menu diff --git a/src/platform/qt/GameController.cpp b/src/platform/qt/GameController.cpp index 83cb6c693..f0d7a8037 100644 --- a/src/platform/qt/GameController.cpp +++ b/src/platform/qt/GameController.cpp @@ -478,8 +478,15 @@ void GameController::setPaused(bool paused) { } void GameController::reset() { + if (!m_gameOpen) { + return; + } + bool wasPaused = isPaused(); setPaused(false); GBAThreadReset(&m_threadContext); + if (wasPaused) { + setPaused(true); + } } void GameController::threadInterrupt() {