Hello @PietJanHein, if SDL2 is mis-mapping the controller's input without Steam involved, then that's a better starting point and should be evaluated upstream at SDL's issue tracker.
@PietJanHein could you try again in steam with setting the controller up as "generic" controller, not "X Box". This did the trick for me, at least in steam with steam-input.
See https://codeberg.org/fabiscafe/game-devices-udev/issues/2#issuecomment-634142
We still have problems in steam, not remembering/saving the configuration and that the triggers do push additional buttons who are not available otherwise and yes, I have to agree with @kisak-valve - this should be done upstream
Nothing extracted yet.
Your system information
Please describe your issue in as much detail as possible:
Describe what you expected should happen and what did happen. Please link any large code pastes as a Github Gist
I bought an 8BitDo Pro 2 wired controller. Note that this is NOT the same hardware as the 8BitDo Pro 2 BlueTooth version and that both behave differently, I can tell because of the config-files from the RetroArch developers: https://github.com/libretro/retroarch-joypad-autoconfig/blob/master/udev/8BitDo_Pro2_BT_X.cfg
This is the BT-version and it maps differently from the wired version. Both 8BitDo Pro 2 BT and 8BitDo Pro 2 wired are named 8BitDo Pro 2, for this reason - to avoid confusion - I will use the name which is listed by the Linux-kernel: 8BitDo 8BitDo Pro 2. In this post I link to a few screenshots, I will also attach those as image-files, to make sure that those stay available and to make it convenient for the reader to view those however he/she prefers.
This controller comes with a few modes, one of the modes in which you can turn it on is the generic gamepad mode, you get that by holding the B-button while plugging in the USB-connector of the controller.
When I run jstest /dev/input/js0 or I use the website https://gamepad-tester.com/ I get a proper mapping, maybe with 2 exceptions (L2 and R2?):
The problem! When I want to use my controller for any game the mapping is not correct. The L2 and R2 buttons on the back get mapped to a part of the right stick of the controller and when I press L2 or R2 there is no input detected at all. I will give one concrete example: with the default controller-mapping in Hollow Knight the super-dash move (also being called crystal dash) gets activated when I move the right stick in between left and center position and the regular dash move gets activated when I move the right stick in between the top and center posititon, these actions are supposed to be done when you hit the L2 and R2 triggers. When I try to map the L2 and R2 triggers in the menu of Hollow Knight it won't even detect L2 or R2 getting pressed.
When I open the controller calibration (https://snipboard.io/pR6VFQ.jpg) from the settings menu of Steam it won't detect when I move the right stick on the vertical axis, it will detect correctly when I move the right stick on the horizontal axis. However, I can set a profile and I will show the result in the screenshots on the following webpages:
https://snipboard.io/sFxBTH.jpg
https://snipboard.io/xuPB5m.jpg
But when I start a game, like Hollow Knight or Dirt4, it won't detect the L2, R2 and right stick correctly.
This is not just a problem with Steam, in other games the inputs are not correct either. But maybe Valve can fix it for Steam or somebody can provide a system-wide solution.
To help other people with debugging I will give a bit more information:
This tool does not give correct mapping either: it won't detect the right stick and L2 and R2 when I try to set a custom mapping. It raises the question for me if this might be a SDL2-related problem. It seems that SDL2 interprets the mapping incorreclty?
Steps for reproducing this issue: