RebelSDL 1.1 - xbox gamepad: some wrong button/axis mappings

Discuss SDL programming with the RebelSDL plugin here
Post Reply
User avatar
fingus
Posts: 269
Joined: Fri Sep 16, 2011 9:53 am

RebelSDL 1.1 - xbox gamepad: some wrong button/axis mappings

Post by fingus »

With Hollywood 9.1 and RebelSDL 1.1 Plugin some button/axis mappings on the newest XBOX Gamepad Controller are wrong:

Image

On first Gamepad connected (0):

rebel_sdl_constant =(is mapped to) real hardware button
============================================
#sdl_button_start = Gamepad R-Shoulder
#sdl_button_back = Gamepad L-Shoulder
#sdl_button_guide = not assigned
#sdl_button_rightshoulder = not assigned
#sdl_button_leftshoulder = Gamepad Y-Button
#sdl_button_y = Gamepad X-Button
#sdl_axis_triggerright = Gamepad L-Trigger
#sdl_axis_triggerleft = not assigned

working:
#sdl_button_dpad (all four directions: up, down, left, right) = correct
#sdl_axis_leftx or lefty = correct
#sdl_button_a = correct

other buttons/axis are not (yet) tested/used in my production.
User avatar
airsoftsoftwair
Posts: 5594
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: RebelSDL 1.1 - xbox gamepad: some wrong button/axis mappings

Post by airsoftsoftwair »

Could be related to the fact that RebelSDL still uses a rather old version of SDL. Something like SDL 2.0.5 whereas the most recent version is 2.28 or something. I guess I need to update RebelSDL then this should probably be working.
User avatar
fingus
Posts: 269
Joined: Fri Sep 16, 2011 9:53 am

Re: RebelSDL 1.1 - xbox gamepad: some wrong button/axis mappings

Post by fingus »

It seems you are right:

2.0.12

Added SDL_GameControllerTypeForIndex(), SDL_GameControllerGetType() to return the type of a game controller (Xbox 360, Xbox One, PS3, PS4, or Nintendo Switch Pro)
User avatar
fingus
Posts: 269
Joined: Fri Sep 16, 2011 9:53 am

Re: RebelSDL 1.1 - xbox gamepad: some wrong button/axis mappings

Post by fingus »

I purchased the Hollywood X Upgrade and use the (new) Joystick functions from it.
Post Reply