mirror of
https://github.com/Genymobile/scrcpy
synced 2025-09-01 23:05:19 +00:00
Rename event converter functions
Rename "XXX_from_sdl_to_android" to "convert_XXX", to avoid huge function names.
This commit is contained in:
@@ -373,7 +373,7 @@ input_manager_process_key(struct input_manager *input_manager,
|
||||
}
|
||||
|
||||
struct control_msg msg;
|
||||
if (input_key_from_sdl_to_android(event, &msg)) {
|
||||
if (convert_input_key(event, &msg)) {
|
||||
if (!controller_push_msg(controller, &msg)) {
|
||||
LOGW("Could not request 'inject keycode'");
|
||||
}
|
||||
@@ -388,9 +388,7 @@ input_manager_process_mouse_motion(struct input_manager *input_manager,
|
||||
return;
|
||||
}
|
||||
struct control_msg msg;
|
||||
if (mouse_motion_from_sdl_to_android(event,
|
||||
input_manager->screen->frame_size,
|
||||
&msg)) {
|
||||
if (convert_mouse_motion(event, input_manager->screen->frame_size, &msg)) {
|
||||
if (!controller_push_msg(input_manager->controller, &msg)) {
|
||||
LOGW("Could not request 'inject mouse motion event'");
|
||||
}
|
||||
@@ -434,9 +432,7 @@ input_manager_process_mouse_button(struct input_manager *input_manager,
|
||||
}
|
||||
|
||||
struct control_msg msg;
|
||||
if (mouse_button_from_sdl_to_android(event,
|
||||
input_manager->screen->frame_size,
|
||||
&msg)) {
|
||||
if (convert_mouse_button(event, input_manager->screen->frame_size, &msg)) {
|
||||
if (!controller_push_msg(input_manager->controller, &msg)) {
|
||||
LOGW("Could not request 'inject mouse button event'");
|
||||
}
|
||||
@@ -451,7 +447,7 @@ input_manager_process_mouse_wheel(struct input_manager *input_manager,
|
||||
.point = get_mouse_point(input_manager->screen),
|
||||
};
|
||||
struct control_msg msg;
|
||||
if (mouse_wheel_from_sdl_to_android(event, position, &msg)) {
|
||||
if (convert_mouse_wheel(event, position, &msg)) {
|
||||
if (!controller_push_msg(input_manager->controller, &msg)) {
|
||||
LOGW("Could not request 'inject mouse wheel event'");
|
||||
}
|
||||
|
Reference in New Issue
Block a user