mirror of
https://github.com/libretro/mgba.git
synced 2024-11-23 16:10:01 +00:00
Qt: Fix controller axis querying
This commit is contained in:
parent
ee6c9f71c2
commit
6b975dcbd3
1
CHANGES
1
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
|
||||
|
||||
|
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user