Forward action button to device
On click event, only the whole buttons state was passed to the device. In addition, on ACTION_DOWN and ACTION_UP, pass the button associated to the action. Refs #3635 <https://github.com/Genymobile/scrcpy/issues/3635> Co-authored-by: Romain Vimont <rom@rom1v.com> Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
committed by
Romain Vimont
parent
07806ba915
commit
0afef0c634
@@ -93,6 +93,7 @@ sc_mouse_processor_process_mouse_click(struct sc_mouse_processor *mp,
|
||||
.pointer_id = event->pointer_id,
|
||||
.position = event->position,
|
||||
.pressure = event->action == SC_ACTION_DOWN ? 1.f : 0.f,
|
||||
.action_button = convert_mouse_buttons(event->button),
|
||||
.buttons = convert_mouse_buttons(event->buttons_state),
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user