From 17d53be3ef9d376e48a7f9e90cf6c87cf8fbf8f5 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 25 Oct 2019 11:06:30 +0200 Subject: [PATCH] Fix mouse events conversion The conversion from SDL mouse state to Android mouse state used wrong constants as mask. Fixes --- app/src/event_converter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/event_converter.c b/app/src/event_converter.c index da4b2e30..700e5c50 100644 --- a/app/src/event_converter.c +++ b/app/src/event_converter.c @@ -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;