mirror of https://github.com/Genymobile/scrcpy
Remove unused virtual mouse
PR #5076 <https://github.com/Genymobile/scrcpy/pull/5076>
This commit is contained in:
parent
51fee79bf5
commit
86b8286217
|
@ -68,8 +68,6 @@ get_well_known_pointer_id_name(uint64_t pointer_id) {
|
||||||
return "mouse";
|
return "mouse";
|
||||||
case SC_POINTER_ID_GENERIC_FINGER:
|
case SC_POINTER_ID_GENERIC_FINGER:
|
||||||
return "finger";
|
return "finger";
|
||||||
case SC_POINTER_ID_VIRTUAL_MOUSE:
|
|
||||||
return "vmouse";
|
|
||||||
case SC_POINTER_ID_VIRTUAL_FINGER:
|
case SC_POINTER_ID_VIRTUAL_FINGER:
|
||||||
return "vfinger";
|
return "vfinger";
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -22,8 +22,7 @@
|
||||||
#define SC_POINTER_ID_GENERIC_FINGER UINT64_C(-2)
|
#define SC_POINTER_ID_GENERIC_FINGER UINT64_C(-2)
|
||||||
|
|
||||||
// Used for injecting an additional virtual pointer for pinch-to-zoom
|
// Used for injecting an additional virtual pointer for pinch-to-zoom
|
||||||
#define SC_POINTER_ID_VIRTUAL_MOUSE UINT64_C(-3)
|
#define SC_POINTER_ID_VIRTUAL_FINGER UINT64_C(-3)
|
||||||
#define SC_POINTER_ID_VIRTUAL_FINGER UINT64_C(-4)
|
|
||||||
|
|
||||||
enum sc_control_msg_type {
|
enum sc_control_msg_type {
|
||||||
SC_CONTROL_MSG_TYPE_INJECT_KEYCODE,
|
SC_CONTROL_MSG_TYPE_INJECT_KEYCODE,
|
||||||
|
|
|
@ -22,7 +22,6 @@ public class Controller implements AsyncProcessor {
|
||||||
|
|
||||||
// control_msg.h values of the pointerId field in inject_touch_event message
|
// control_msg.h values of the pointerId field in inject_touch_event message
|
||||||
private static final int POINTER_ID_MOUSE = -1;
|
private static final int POINTER_ID_MOUSE = -1;
|
||||||
private static final int POINTER_ID_VIRTUAL_MOUSE = -3;
|
|
||||||
|
|
||||||
private static final ScheduledExecutorService EXECUTOR = Executors.newSingleThreadScheduledExecutor();
|
private static final ScheduledExecutorService EXECUTOR = Executors.newSingleThreadScheduledExecutor();
|
||||||
|
|
||||||
|
@ -273,8 +272,8 @@ public class Controller implements AsyncProcessor {
|
||||||
pointer.setPressure(pressure);
|
pointer.setPressure(pressure);
|
||||||
|
|
||||||
int source;
|
int source;
|
||||||
if (pointerId == POINTER_ID_MOUSE || pointerId == POINTER_ID_VIRTUAL_MOUSE) {
|
if (pointerId == POINTER_ID_MOUSE) {
|
||||||
// real mouse event (forced by the client when --forward-on-click)
|
// real mouse event
|
||||||
pointerProperties[pointerIndex].toolType = MotionEvent.TOOL_TYPE_MOUSE;
|
pointerProperties[pointerIndex].toolType = MotionEvent.TOOL_TYPE_MOUSE;
|
||||||
source = InputDevice.SOURCE_MOUSE;
|
source = InputDevice.SOURCE_MOUSE;
|
||||||
pointer.setUp(buttons == 0);
|
pointer.setUp(buttons == 0);
|
||||||
|
|
Loading…
Reference in New Issue