Qt: Disable held-rewind when a window loses focus
Jeffrey Pfau jeffrey@endrift.com
Thu, 11 Jun 2015 01:27:51 -0700
2 files changed,
4 insertions(+),
0 deletions(-)
M
src/platform/qt/GameController.cpp
→
src/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.cpp
→
src/platform/qt/Window.cpp
@@ -406,6 +406,7 @@ }
void Window::focusOutEvent(QFocusEvent*) { m_controller->setTurbo(false, false); + m_controller->stopRewinding(); m_controller->clearKeys(); }