mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-02-16 10:31:07 +00:00
Consume unhandled gamepad mouse events to prevent duplicate mouse actions
This commit is contained in:
@@ -1623,16 +1623,17 @@ public class ControllerHandler implements InputManager.InputDeviceListener, UsbD
|
||||
switch (event.getActionMasked()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
context.inputMap |= ControllerPacket.TOUCHPAD_FLAG;
|
||||
sendControllerInputPacket(context);
|
||||
break;
|
||||
case MotionEvent.ACTION_UP:
|
||||
case MotionEvent.ACTION_CANCEL:
|
||||
context.inputMap &= ~ControllerPacket.TOUCHPAD_FLAG;
|
||||
sendControllerInputPacket(context);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
||||
sendControllerInputPacket(context);
|
||||
return !prefConfig.gamepadTouchpadAsMouse;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user