Ryochan7 / sc-controller

User-mode driver and GTK3 based GUI for Steam Controller
GNU General Public License v2.0
177 stars 23 forks source link

BTN aliases broken on later Linux kernels #46

Closed Ryochan7 closed 2 years ago

Ryochan7 commented 2 years ago

Wonderful Linux quality control. I am not sure how long it has been the case but some of the BTN aliases specified in input-event-codes.h have been changed and have broken mapping; to note, I am using Linux kernel version 5.14.17 on Fedora 33. In the case of SC Controller, BTN_X and BTN_Y mappings are busted as they now point to the wrong directions. BTN_X is mapped to BTN_NORTH and BTN_Y is mapped to BTN_WEST. Clearly wrong for an Xbox 360 controller. Can't even say that the Nintendo layout is being used as BTN_A and BTN_B are mapped to BTN_SOUTH and BTN_EAST respectively.

SC Controller should probably be changed to use the newer BTN direction aliases rather than using the older BTN name aliases.

https://github.com/torvalds/linux/blob/master/include/uapi/linux/input-event-codes.h#L386

Ryochan7 commented 2 years ago

Can't do what I wanted as changing that behavior could break button mappings for games. In my case, I am testing using Streets of Rage 4. Ended up having to change the SPECIAL_NAMES aliases used within SC Controller. Not what I wanted to do but it works for me. This is a problem that stems from the Linux kernel.

https://github.com/Ryochan7/sc-controller/commit/adecabb1ad98c9a95f18681568f43b5415b1fb9e