Qt: Fix potential crash if a gamepad causes focus to change

This commit is contained in:
Jeffrey Pfau 2015-04-14 20:46:41 -07:00
parent e112e86715
commit 27a178fe3c
2 changed files with 5 additions and 0 deletions

View File

@ -20,6 +20,7 @@ Bugfixes:
- Qt: Fix regression where video would not record if the game had already started
- GBA: Fix rewind boundary conditions
- GBA: Add initial I/O register settings for background matrix registers
- Qt: Fix potential crash if a gamepad causes focus to change
Misc:
- Qt: Show multiplayer numbers in window title

View File

@ -290,6 +290,10 @@ void InputController::testGamepad() {
QApplication::sendEvent(QApplication::focusWidget(), event);
}
if (!QApplication::focusWidget()) {
return;
}
activeButtons.subtract(oldButtons);
oldButtons.subtract(m_activeButtons);