input: Correct screen swapping input remapping with touchscreens

The virtual keypad uses BUTTON_MIDLEFT/MIDRIGHT not LEFT/RIGHT

Change-Id: I5f02c1e5b8c22403d3ff243568e562de834cd0a9
This commit is contained in:
Solomon Peachy 2025-05-06 09:29:04 -04:00
parent 5e8a73a817
commit 9b39c96ac7

View file

@ -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;