-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Solved] XBox controller not working correctly on Raspbian with latest source build. (actually under Retropie) #4655
Comments
Ok so I managed to get my XBox One controller to work with test/testgamecontroller but only by editing the testgamecontroller.c source adding a call to SDL_GameControllerAddMappingsFromFile() which I pointed to a small file generated by test/controllermap. Is this expected behavior as my DS4 controllers don't need this? Is there a rule for when this is needed and when it is not? Is it because the xbox controllers are XInput devices? |
Update: I proceeded with trying to use the well known controller remapping file https://github.com/gabomdq/SDL_GameControllerDB/blob/master/gamecontrollerdb.txt instead of my homebaked version so I could cover the very large set of controllers included in that file. But I found that the remappings in the gamecontrollerdb.txt file did not work. The one I generated with test/controllermap does make my xbox controller work. So this was a setback that I'm now not sure how to resolve. Does anyone know why this is? |
Update, comparing remap files just generated with test/controllermap with the corresponding entries in https://github.com/gabomdq/SDL_GameControllerDB/blob/master/gamecontrollerdb.txt shows completely different mapping entries. So far for my XBox One pad and another users XBox 360 gamepad. I feel something has changed but I don't know where. |
Connected to: mdqinc/SDL_GameControllerDB#478 ? |
I just re-flashed a microsd card with a 10 month old Raspbian OS image (official) and installed my software on that. These are some of the versions, Setting up libsdl2-dev (2.0.9+dfsg1-1+rpt1) ... -- Checking for module 'libudev' Kernel 5.4.51-v7l+ Elsewhere Iv'e noticed messages about the kernel driver 'xpad'. Not exactly for my symptoms though so not sure if that would be involved. |
Problem Solved! You can read more here: RetroPie/RetroPie-Setup#3379 |
I'm working on a gaming application and am noticing that mine and others' XBox controllers are not working as expected.
Some button mappings are good but others are incorrect or absent.
I'm on Raspbian Buster 32bit with Kernel 5.10.
Raspberry Pi4B
I apt removed the previous copy of SDL2.
I then git cloned the main master of this SDL git repo and successfully built. (so should have gotten the latest as of yesterday)
I just now also built the SDL test programs and ran 'testgamecontroller' which confirmed that SDL is not handling it correctly.
This should be my controller:
Joystick Name: 'Microsoft X-Box One pad (Firmware 2015)'
Joystick GUID: 030000005e040000dd02000003020000
Joystick Number: 0
Number of Axes: 4
Number of Buttons: 13
Number of Hats: 1
Number of Balls: 0
GameController:
Name: 'XInput Controller'
Mapping: '(null)'
I have had other users (of the app I'm working on) that also report xbox controllers not working.
Is there a known workaround to this?
Cheers
Fred
The text was updated successfully, but these errors were encountered: