winterhell's picture

Joystick Device does not detect all buttons on some gamepads

I noticed you are in the process of implementing a new GamePad class so I thought I should bring this issue up.

I'm using a 6 button Sega Mega Drive controller, and JoystickDevice is detecting the D-PAD and X,Y,Z, and the shoulder button, but does not detect A,B,C and Start. The gamepad works fully in several games and emulators I tried. For example in MicroMachines V4 Start, A,B and C are buttons 1 through 4, and Trigger,X,Y,Z are 5 through 8.

I remembered there was an old Windows cap for 4 buttons, so I tried an Xbox 360 gamepad, but the JoystickDevice recognized all buttons.

Edit: after playing some emulators now the JoystickDevice recognizes all 8 buttons and in the correct order. Further investigation is needed why and how is this happening.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
the Fiddler's picture

Does this affect the SDL2 backend or just the native windows backend? The windows backend has a known issue with hats, but so if any buttons are reported as a hat they will currently fail to work. A fix is WIP.

I think you can check this through the windows control panel.

Edit: weird.

winterhell's picture

Actually yes, thats exactly what happened... After I posted the topic I placed the SDL2.dll file to fix the switching issue and now all the buttons are reported, but the Y axis on the D-Pad is reversed