all repos — mgba @ 4da22679b92f59acc67abaeadd7c37c3c459cdfc

mGBA Game Boy Advance Emulator

Qt: Only send button events if there is a widget in focus
Jeffrey Pfau jeffrey@endrift.com
Sun, 04 Jan 2015 22:42:42 -0800
commit

4da22679b92f59acc67abaeadd7c37c3c459cdfc

parent

ac686e3942bd3ba02b233b31286db2cae4661ba3

1 files changed, 3 insertions(+), 0 deletions(-)

jump to
M src/platform/qt/InputController.cppsrc/platform/qt/InputController.cpp

@@ -194,6 +194,9 @@

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) {