mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 19:13:03 +00:00
Ignore back button presses on the default context
This commit is contained in:
parent
ff38074f55
commit
ec69fef36f
@ -96,6 +96,12 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
|||||||
defaultContext.rightTriggerAxis = MotionEvent.AXIS_GAS;
|
defaultContext.rightTriggerAxis = MotionEvent.AXIS_GAS;
|
||||||
defaultContext.controllerNumber = (short) 0;
|
defaultContext.controllerNumber = (short) 0;
|
||||||
defaultContext.assignedControllerNumber = true;
|
defaultContext.assignedControllerNumber = true;
|
||||||
|
|
||||||
|
// Some devices (GPD XD) have a back button which sends input events
|
||||||
|
// with device ID == 0. This hits the default context which would normally
|
||||||
|
// consume these. Instead, let's ignore them since that's probably the
|
||||||
|
// most likely case.
|
||||||
|
defaultContext.ignoreBack = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static InputDevice.MotionRange getMotionRangeForJoystickAxis(InputDevice dev, int axis) {
|
private static InputDevice.MotionRange getMotionRangeForJoystickAxis(InputDevice dev, int axis) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user