From ba2f43bc67340d6b073abb58f79fa57a5e66a5fd Mon Sep 17 00:00:00 2001 From: Clownacy Date: Sat, 11 Apr 2020 22:17:53 +0100 Subject: [PATCH] Fix bug in SDL2 controller backend --- src/Backends/SDL2/Controller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Backends/SDL2/Controller.cpp b/src/Backends/SDL2/Controller.cpp index 7b2eae08..18fe5307 100644 --- a/src/Backends/SDL2/Controller.cpp +++ b/src/Backends/SDL2/Controller.cpp @@ -81,7 +81,7 @@ BOOL ControllerBackend_GetJoystickStatus(JOYSTICK_STATUS *status) } // Then the joystick hats - for (int i = 0; i < total_axes; ++i) + for (int i = 0; i < total_hats; ++i) { Uint8 hat = SDL_JoystickGetHat(joystick, i);