all repos — mgba @ 4ba576ef8738763b66422b5c48fe83a0117351c3

mGBA Game Boy Advance Emulator

Qt: Disable held-rewind when a window loses focus
Jeffrey Pfau jeffrey@endrift.com
Thu, 11 Jun 2015 01:27:51 -0700
commit

4ba576ef8738763b66422b5c48fe83a0117351c3

parent

5213b8a1fee97ab5bfb62a65278fd042001fc913

2 files changed, 4 insertions(+), 0 deletions(-)

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

@@ -479,6 +479,9 @@ m_rewindTimer.start();

} void GameController::stopRewinding() { + if (!m_rewindTimer.isActive()) { + return; + } m_rewindTimer.stop(); setPaused(m_wasPaused); }
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -406,6 +406,7 @@ }

void Window::focusOutEvent(QFocusEvent*) { m_controller->setTurbo(false, false); + m_controller->stopRewinding(); m_controller->clearKeys(); }