all repos — mgba @ 6b975dcbd3e402df553b2d1e9e5458e58fa02b86

mGBA Game Boy Advance Emulator

Qt: Fix controller axis querying
Jeffrey Pfau jeffrey@endrift.com
Fri, 17 Apr 2015 00:57:37 -0700
commit

6b975dcbd3e402df553b2d1e9e5458e58fa02b86

parent

ee6c9f71c24cbbc3588af9517e226c13bc16e3e8

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

jump to
M CHANGESCHANGES

@@ -24,6 +24,7 @@ - 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 - GBA Memory: Allow SRAM to be 64kB + - Qt: Fix controller axis querying Misc: - Qt: Show multiplayer numbers in window title
M src/platform/qt/InputController.cppsrc/platform/qt/InputController.cpp

@@ -285,13 +285,14 @@ bool newlyAboveThreshold = activeAxes.contains(axis);

GamepadAxisEvent* event = new GamepadAxisEvent(axis.first, axis.second, newlyAboveThreshold, this); if (newlyAboveThreshold) { postPendingEvent(event->gbaKey()); + QApplication::sendEvent(QApplication::focusWidget(), event); if (!event->isAccepted()) { clearPendingEvent(event->gbaKey()); } } else if (oldAxes.contains(axis)) { clearPendingEvent(event->gbaKey()); + QApplication::sendEvent(QApplication::focusWidget(), event); } - QApplication::sendEvent(QApplication::focusWidget(), event); } if (!QApplication::focusWidget()) {