Skip to content

Commit

Permalink
Fix mouse events conversion
Browse files Browse the repository at this point in the history
The conversion from SDL mouse state to Android mouse state used wrong
constants as mask.

Fixes <#635>
  • Loading branch information
rom1v committed Oct 25, 2019
1 parent 1f8ba1c commit 17d53be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/event_converter.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ convert_mouse_buttons(uint32_t state) {
if (state & SDL_BUTTON_MMASK) {
buttons |= AMOTION_EVENT_BUTTON_TERTIARY;
}
if (state & SDL_BUTTON_X1) {
if (state & SDL_BUTTON_X1MASK) {
buttons |= AMOTION_EVENT_BUTTON_BACK;
}
if (state & SDL_BUTTON_X2) {
if (state & SDL_BUTTON_X2MASK) {
buttons |= AMOTION_EVENT_BUTTON_FORWARD;
}
return buttons;
Expand Down

0 comments on commit 17d53be

Please sign in to comment.