From 9b39c96ac79f8af5218edea7e338536a1ebeecd4 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Tue, 6 May 2025 09:29:04 -0400 Subject: [PATCH] input: Correct screen swapping input remapping with touchscreens The virtual keypad uses BUTTON_MIDLEFT/MIDRIGHT not LEFT/RIGHT Change-Id: I5f02c1e5b8c22403d3ff243568e562de834cd0a9 --- apps/action.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/action.c b/apps/action.c index 4566c82288..51c2f1fac2 100644 --- a/apps/action.c +++ b/apps/action.c @@ -488,7 +488,7 @@ static inline void button_flip_horizontally(int context, int *button) { newbutton |= BUTTON_LEFT; } -#else +#elif !defined(NO_BUTTON_LR) #warning "BUTTON_LEFT / BUTTON_RIGHT not defined!" #endif @@ -770,7 +770,7 @@ static inline int do_auto_softlock(action_last_t *last, action_cur_t *cur) #if defined(HAVE_TOUCHSCREEN) const int touch_fakebuttons = BUTTON_TOPLEFT | BUTTON_TOPMIDDLE | BUTTON_TOPRIGHT | - BUTTON_LEFT | BUTTON_CENTER | BUTTON_RIGHT | + BUTTON_MIDLEFT | BUTTON_CENTER | BUTTON_MIDRIGHT | BUTTON_BOTTOMLEFT | BUTTON_BOTTOMMIDDLE | BUTTON_BOTTOMRIGHT; if (has_flag(cur->button, BUTTON_TOUCHSCREEN)) cur->button = BUTTON_NONE;