mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix potential crash if a gamepad causes focus to change
This commit is contained in:
parent
e112e86715
commit
27a178fe3c
1
CHANGES
1
CHANGES
|
@ -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
|
||||
|
||||
|
|
|
@ -290,6 +290,10 @@ void InputController::testGamepad() {
|
|||
QApplication::sendEvent(QApplication::focusWidget(), event);
|
||||
}
|
||||
|
||||
if (!QApplication::focusWidget()) {
|
||||
return;
|
||||
}
|
||||
|
||||
activeButtons.subtract(oldButtons);
|
||||
oldButtons.subtract(m_activeButtons);
|
||||
|
||||
|
|
Loading…
Reference in New Issue