mirror of https://github.com/mgba-emu/mgba.git
Qt: Disable held-rewind when a window loses focus
This commit is contained in:
parent
5213b8a1fe
commit
4ba576ef87
|
@ -479,6 +479,9 @@ void GameController::startRewinding() {
|
|||
}
|
||||
|
||||
void GameController::stopRewinding() {
|
||||
if (!m_rewindTimer.isActive()) {
|
||||
return;
|
||||
}
|
||||
m_rewindTimer.stop();
|
||||
setPaused(m_wasPaused);
|
||||
}
|
||||
|
|
|
@ -406,6 +406,7 @@ void Window::closeEvent(QCloseEvent* event) {
|
|||
|
||||
void Window::focusOutEvent(QFocusEvent*) {
|
||||
m_controller->setTurbo(false, false);
|
||||
m_controller->stopRewinding();
|
||||
m_controller->clearKeys();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue