shithub: cstory

Download patch

ref: ba2f43bc67340d6b073abb58f79fa57a5e66a5fd
parent: b2679edf37e9cccd2a17732f47f5f6561939e9e7
author: Clownacy <Clownacy@users.noreply.github.com>
date: Sat Apr 11 18:17:53 EDT 2020

Fix bug in SDL2 controller backend

--- a/src/Backends/SDL2/Controller.cpp
+++ b/src/Backends/SDL2/Controller.cpp
@@ -81,7 +81,7 @@
 	}
 
 	// 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);