mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 11:03:01 +00:00
Fix mouse jumping on Shield devices when clicking or scrolling
This commit is contained in:
parent
5b86e99138
commit
45ff51c0d2
@ -75,8 +75,10 @@ public class ShieldCaptureProvider extends InputCaptureProvider {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean eventHasRelativeMouseAxes(MotionEvent event) {
|
public boolean eventHasRelativeMouseAxes(MotionEvent event) {
|
||||||
return event.getAxisValue(AXIS_RELATIVE_X) != 0 ||
|
// All mouse events should use relative axes, even if they are zero. This avoids triggering
|
||||||
event.getAxisValue(AXIS_RELATIVE_Y) != 0;
|
// cursor jumps if we get an event with no associated motion, like ACTION_DOWN or ACTION_UP.
|
||||||
|
return event.getPointerCount() == 1 && event.getActionIndex() == 0 &&
|
||||||
|
event.getToolType(0) == MotionEvent.TOOL_TYPE_MOUSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user