We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4723

Summary: Generic Xbox pad controller bindings seem odd/broken
Product: SDL Reporter: alexrice999
Component: joystickAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: minor    
Priority: P2    
Version: 2.0.9   
Hardware: x86_64   
OS: Linux   

Description alexrice999 2019-07-14 14:10:02 UTC
I have a knock off wired xbox 360 controller called afterglow for xbox 360 controller. Despite there being a few afterglow controllers in the controller mapping the guid of my controller seems to map to Generic Xbox pad. This binding is as follows:
```
 "030000006f0e00001304000000010000,Generic X-Box pad,a:b0,b:b1,back:b6,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,dpup:h0.1,guide:b8,leftshoulder:b4,leftstick:a0,lefttrigger:a2,leftx:a0,lefty:a1,rightshoulder:b5,rightstick:a3,righttrigger:a5,rightx:a3,righty:a4,start:b7,x:b2,y:b3,",
```
When running openmw I have a strange issue that the joysticks work for up and down movements but not for side to side. I managed to track this down to the side to side events being classified as joystick events instead of gamepad events. 
I believe this is due to both "leftstick" and "leftx" being bound to "a0" which seems odd to me. If I change openmw's mappings to remove these the controller works as expected. I was hoping someone who knows a lot more than me (as I have only been exploring this today trying to fix my controller) would know what is happening

Extra Info:
Openmw: https://github.com/OpenMW/openmw
openmw recognises my controller as "Generic X-box pad"
Guid and correct bindings were retrieved using steam big picture as detailed in https://github.com/gabomdq/SDL_GameControllerDB#mapping-tools
Comment 1 Sam Lantinga 2019-07-15 00:00:10 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/2c2adb2ebc96

Can you verify that the left and right thumbstick buttons work correctly?
Comment 2 alexrice999 2019-07-15 08:47:50 UTC
If I get the game to load that string ++ "platform:linux," then everything works
Thanks a lot
Comment 3 Sam Lantinga 2019-07-15 16:39:28 UTC
Great, thanks!