#77868
LaLaLand
Guest

I have the a Hori fighting stick mini 3 and I got the same problem as fmn5075.

I looked thru the source code and found the problem to be in this file:

src/rpi/input.cpp

Basically under SDL the Hori joystick is detected as the POV hat instead of a joystick. So to fix the issue you just have to change the function ‘is_joy_axis_pressed’ to get the ‘Hat’ instead:

if(SDL_JoystickGetAxis(myjoy[joynum], axis) < -12000) return true;

become:

if(axis == 0 && SDL_JoystickGetHat(myjoy[joynum], 0) & SDL_HAT_LEFT) return true;
if(axis == 1 && SDL_JoystickGetHat(myjoy[joynum], 0) & SDL_HAT_UP) return true;

Similarly the line:

if(SDL_JoystickGetAxis(myjoy[joynum], axis) > 12000) return true;

become:

if(axis == 0 && SDL_JoystickGetHat(myjoy[joynum], 0) & SDL_HAT_RIGHT) return true;
if(axis == 1 && SDL_JoystickGetHat(myjoy[joynum], 0) & SDL_HAT_DOWN) return true;

You just have to recompile it (i.e. type make) and it should work after. Hope this help.