mirror of https://github.com/Genymobile/scrcpy
Add missing SC_ prefix for pointer id constants
PR #5076 <https://github.com/Genymobile/scrcpy/pull/5076>
This commit is contained in:
parent
6d98766cd5
commit
0bce4d7f56
|
@ -64,13 +64,13 @@ static const char *const copy_key_labels[] = {
|
||||||
static inline const char *
|
static inline const char *
|
||||||
get_well_known_pointer_id_name(uint64_t pointer_id) {
|
get_well_known_pointer_id_name(uint64_t pointer_id) {
|
||||||
switch (pointer_id) {
|
switch (pointer_id) {
|
||||||
case POINTER_ID_MOUSE:
|
case SC_POINTER_ID_MOUSE:
|
||||||
return "mouse";
|
return "mouse";
|
||||||
case POINTER_ID_GENERIC_FINGER:
|
case SC_POINTER_ID_GENERIC_FINGER:
|
||||||
return "finger";
|
return "finger";
|
||||||
case POINTER_ID_VIRTUAL_MOUSE:
|
case SC_POINTER_ID_VIRTUAL_MOUSE:
|
||||||
return "vmouse";
|
return "vmouse";
|
||||||
case POINTER_ID_VIRTUAL_FINGER:
|
case SC_POINTER_ID_VIRTUAL_FINGER:
|
||||||
return "vfinger";
|
return "vfinger";
|
||||||
default:
|
default:
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -18,12 +18,12 @@
|
||||||
// type: 1 byte; sequence: 8 bytes; paste flag: 1 byte; length: 4 bytes
|
// type: 1 byte; sequence: 8 bytes; paste flag: 1 byte; length: 4 bytes
|
||||||
#define SC_CONTROL_MSG_CLIPBOARD_TEXT_MAX_LENGTH (SC_CONTROL_MSG_MAX_SIZE - 14)
|
#define SC_CONTROL_MSG_CLIPBOARD_TEXT_MAX_LENGTH (SC_CONTROL_MSG_MAX_SIZE - 14)
|
||||||
|
|
||||||
#define POINTER_ID_MOUSE UINT64_C(-1)
|
#define SC_POINTER_ID_MOUSE UINT64_C(-1)
|
||||||
#define 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 POINTER_ID_VIRTUAL_MOUSE UINT64_C(-3)
|
#define SC_POINTER_ID_VIRTUAL_MOUSE UINT64_C(-3)
|
||||||
#define POINTER_ID_VIRTUAL_FINGER UINT64_C(-4)
|
#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,
|
||||||
|
|
|
@ -376,8 +376,8 @@ simulate_virtual_finger(struct sc_input_manager *im,
|
||||||
msg.inject_touch_event.position.screen_size = im->screen->frame_size;
|
msg.inject_touch_event.position.screen_size = im->screen->frame_size;
|
||||||
msg.inject_touch_event.position.point = point;
|
msg.inject_touch_event.position.point = point;
|
||||||
msg.inject_touch_event.pointer_id =
|
msg.inject_touch_event.pointer_id =
|
||||||
im->has_secondary_click ? POINTER_ID_VIRTUAL_MOUSE
|
im->has_secondary_click ? SC_POINTER_ID_VIRTUAL_MOUSE
|
||||||
: POINTER_ID_VIRTUAL_FINGER;
|
: SC_POINTER_ID_VIRTUAL_FINGER;
|
||||||
msg.inject_touch_event.pressure = up ? 0.0f : 1.0f;
|
msg.inject_touch_event.pressure = up ? 0.0f : 1.0f;
|
||||||
msg.inject_touch_event.action_button = 0;
|
msg.inject_touch_event.action_button = 0;
|
||||||
msg.inject_touch_event.buttons = 0;
|
msg.inject_touch_event.buttons = 0;
|
||||||
|
@ -662,8 +662,8 @@ sc_input_manager_process_mouse_motion(struct sc_input_manager *im,
|
||||||
|
|
||||||
struct sc_mouse_motion_event evt = {
|
struct sc_mouse_motion_event evt = {
|
||||||
.position = sc_input_manager_get_position(im, event->x, event->y),
|
.position = sc_input_manager_get_position(im, event->x, event->y),
|
||||||
.pointer_id = im->has_secondary_click ? POINTER_ID_MOUSE
|
.pointer_id = im->has_secondary_click ? SC_POINTER_ID_MOUSE
|
||||||
: POINTER_ID_GENERIC_FINGER,
|
: SC_POINTER_ID_GENERIC_FINGER,
|
||||||
.xrel = event->xrel,
|
.xrel = event->xrel,
|
||||||
.yrel = event->yrel,
|
.yrel = event->yrel,
|
||||||
.buttons_state =
|
.buttons_state =
|
||||||
|
@ -817,8 +817,8 @@ sc_input_manager_process_mouse_button(struct sc_input_manager *im,
|
||||||
.position = sc_input_manager_get_position(im, event->x, event->y),
|
.position = sc_input_manager_get_position(im, event->x, event->y),
|
||||||
.action = sc_action_from_sdl_mousebutton_type(event->type),
|
.action = sc_action_from_sdl_mousebutton_type(event->type),
|
||||||
.button = sc_mouse_button_from_sdl(event->button),
|
.button = sc_mouse_button_from_sdl(event->button),
|
||||||
.pointer_id = im->has_secondary_click ? POINTER_ID_MOUSE
|
.pointer_id = im->has_secondary_click ? SC_POINTER_ID_MOUSE
|
||||||
: POINTER_ID_GENERIC_FINGER,
|
: SC_POINTER_ID_GENERIC_FINGER,
|
||||||
.buttons_state = sc_mouse_buttons_state_from_sdl(sdl_buttons_state,
|
.buttons_state = sc_mouse_buttons_state_from_sdl(sdl_buttons_state,
|
||||||
&im->mouse_bindings),
|
&im->mouse_bindings),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue