mirror of https://github.com/mgba-emu/mgba.git
Qt: Only send button events if there is a widget in focus
This commit is contained in:
parent
ac686e3942
commit
4da22679b9
|
@ -194,6 +194,9 @@ void InputController::testGamepad() {
|
|||
auto activeButtons = activeGamepadButtons();
|
||||
auto oldButtons = m_activeButtons;
|
||||
m_activeButtons = activeButtons;
|
||||
if (!QApplication::focusWidget()) {
|
||||
return;
|
||||
}
|
||||
activeButtons.subtract(oldButtons);
|
||||
oldButtons.subtract(m_activeButtons);
|
||||
for (int button : activeButtons) {
|
||||
|
|
Loading…
Reference in New Issue