From edd604b7005164e627546623a7c486fab452c117 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 6dfc8eeaf..7b5ba565f 100644 --- a/CHANGES +++ b/CHANGES @@ -40,6 +40,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: - Qt: Window size command line options are now supported - Qt: Increase usability of key mapper diff --git a/src/platform/qt/GameController.cpp b/src/platform/qt/GameController.cpp index 07b5bad50..a84ab1df0 100644 --- a/src/platform/qt/GameController.cpp +++ b/src/platform/qt/GameController.cpp @@ -474,8 +474,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() {