mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2026-10-20 07:24:42 +00:00
Consume unhandled gamepad mouse events to prevent duplicate mouse actions
This commit is contained in:
1 parent
0e3b472f78
commit
229eff49fb
1 file changed
+3
-2
@@ -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