mirror of
https://github.com/Genymobile/scrcpy
synced 2025-08-31 22:35:37 +00:00
Fix mouse events conversion
The conversion from SDL mouse state to Android mouse state used wrong constants as mask. Fixes <https://github.com/Genymobile/scrcpy/issues/635>
This commit is contained in:
@@ -149,10 +149,10 @@ convert_mouse_buttons(uint32_t state) {
|
|||||||
if (state & SDL_BUTTON_MMASK) {
|
if (state & SDL_BUTTON_MMASK) {
|
||||||
buttons |= AMOTION_EVENT_BUTTON_TERTIARY;
|
buttons |= AMOTION_EVENT_BUTTON_TERTIARY;
|
||||||
}
|
}
|
||||||
if (state & SDL_BUTTON_X1) {
|
if (state & SDL_BUTTON_X1MASK) {
|
||||||
buttons |= AMOTION_EVENT_BUTTON_BACK;
|
buttons |= AMOTION_EVENT_BUTTON_BACK;
|
||||||
}
|
}
|
||||||
if (state & SDL_BUTTON_X2) {
|
if (state & SDL_BUTTON_X2MASK) {
|
||||||
buttons |= AMOTION_EVENT_BUTTON_FORWARD;
|
buttons |= AMOTION_EVENT_BUTTON_FORWARD;
|
||||||
}
|
}
|
||||||
return buttons;
|
return buttons;
|
||||||
|
Reference in New Issue
Block a user