-
-
Couldn't load subscription status.
- Fork 102
Description
Describe the bug
Gamepadcontrollers which are identified in the gamecontrollerdb.txt but have physically than 16 buttons and do have a RetroPie Gamecontroller *.cfg file do not get all buttons mapped into Amiberry controller.
For example: A gamepad with 13 physical buttons has UP/DOWN mapped but LEFT/RIGHT (the 14th and 15th in the list, retroarch.cpp::retroarch_button_list[]) is "cut off"/ not mapped. If a gamepad has 12 physical buttons reported then also DOWN is "cut off" from the mapping.
To Reproduce
Steps to reproduce the behavior:
- Have a gamepad controller connected with <16 buttons defined. The controller does not report/use a hat.
- Have it configured in RetroPie / EmulationStation
- Launch Amiberry
- Note that not all buttons are mapped (everything between physical button count (e.g. 13) up to the possible 15th button) is missing
Expected behavior
All buttons (up to 15) defined in Controller.cfg file are mapped into Amiberry
Desktop
- Rpi5 without X/Wayland and current RetroPie
- OS: Bookworm 12.x (current), aarch, libSDL2 2.26.3+1rpi
- Amiberry Version: 5.7.1, but should also be reproducable in more recent versions
Workaround
Remove the RetroPie Gamecontoller.cfg file, then all buttons are mapped as expected.
Additional context
retroarch.cfgis not geared/utilized to player input mapping. But if it is, the effect is most likely the same.- From looking at the code I see the
did->buttons/did->buttons_realcontain the pyhsical buttons, assetup_mappingis using the full 15 buttons. But for some reason the buttons reported frommap_from_retroarch()don't end up in the final result. - If you can provide some hints I could implement and test a fix