From 6b975dcbd3e402df553b2d1e9e5458e58fa02b86 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Fri, 17 Apr 2015 00:57:37 -0700 Subject: [PATCH] Qt: Fix controller axis querying --- CHANGES | 1 + src/platform/qt/InputController.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 2d2f64b0e..eee92d4ee 100644 --- a/CHANGES +++ b/CHANGES @@ -24,6 +24,7 @@ Bugfixes: - 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 diff --git a/src/platform/qt/InputController.cpp b/src/platform/qt/InputController.cpp index c6ba5690c..4ec263108 100644 --- a/src/platform/qt/InputController.cpp +++ b/src/platform/qt/InputController.cpp @@ -285,13 +285,14 @@ void InputController::testGamepad() { 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()) {