From e27ebd46186efc1e475d3eeea3eb452df4a71dce Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Tue, 19 Jul 2022 05:04:47 +0200 Subject: [PATCH] mainloop: Fix up controller sticks and axes also on SDL builds for GNU/Linux --- src/mainloop.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mainloop.c b/src/mainloop.c index 4be18dc..61026d1 100644 --- a/src/mainloop.c +++ b/src/mainloop.c @@ -114,7 +114,9 @@ static inline bool HandleEvent(struct Game* game, ALLEGRO_EVENT* ev) { al_reconfigure_joysticks(); break; case ALLEGRO_EVENT_JOYSTICK_AXIS: -#if (ALLEGRO_VERSION_INT >= ((5 << 24) | (2 << 16) | (5 << 8))) +#if (defined(ALLEGRO_SDL) && !defined(__SWITCH__) && !defined(__vita__)) + if (true) { +#elif (ALLEGRO_VERSION_INT >= ((5 << 24) | (2 << 16) | (5 << 8))) if ((al_get_system_id() == ALLEGRO_SYSTEM_ID_XGLX) || (al_get_system_id() == ALLEGRO_SYSTEM_ID_RASPBERRYPI)) { #elif defined(ALLEGRO_WITH_XWINDOWS) if (true) {