Skip to content

Commit

Permalink
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/com/genymobile/scrcpy/EventController.java
Original file line number Diff line number Diff line change
@@ -31,7 +31,7 @@ public EventController(DesktopConnection connection) {
private void initPointer() {
MotionEvent.PointerProperties props = pointerProperties[0];
props.id = 0;
props.toolType = MotionEvent.TOOL_TYPE_MOUSE;
props.toolType = MotionEvent.TOOL_TYPE_FINGER;

MotionEvent.PointerCoords coords = pointerCoords[0];
coords.orientation = 0;
@@ -108,7 +108,7 @@ private boolean injectMouse(int action, int buttons, Point point) {
return false;
}
setPointerCoords(rawPoint);
MotionEvent event = MotionEvent.obtain(lastMouseDown, now, action, 1, pointerProperties, pointerCoords, 0, buttons, 1f, 1f, 0, 0, InputDevice.SOURCE_MOUSE, 0);
MotionEvent event = MotionEvent.obtain(lastMouseDown, now, action, 1, pointerProperties, pointerCoords, 0, buttons, 1f, 1f, 0, 0, InputDevice.SOURCE_TOUCHSCREEN, 0);
return injectEvent(event);
}

0 comments on commit f70359f

Please sign in to comment.