-
Notifications
You must be signed in to change notification settings - Fork 367
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
Standardizing naming for controllers (affects input_device value and file name) #1157
Comments
… Pro Controller (default-off).cfg "Pro Controller" not "Nintendo Switch Pro Controller" Just re-evaluated the settings from scratch and updated libretro#1157
Did you check if its even using the same input driver for the varying configurations? |
Same output for all controller drivers. |
lsusb output and your udev rules? |
Sorry if I was not clear enough when I said "same output for all controller drivers." so I added this to the top post:
I am currently documenting a standard naming scheme in this guide that aligns with the "Differentiate between HID and non-HID variants" suggestion from the top post of this issue. This ensures that the controller name in older systems matches the controller name generated by RetroArch in these systems. This issue can always be re-opened if the developers want to discuss the naming scheme further. |
To address the inconsistencies in input_device naming across different Linux distributions, we will establish and document a standardized naming policy for controllers in our controller autoconfiguration guide at https://github.com/libretro/docs/blob/master/docs/guides/controller-autoconfiguration.md to ensure clarity and consistency for both users and developers.
Standardizing
input_device
Values in Autoconfig FilesWe need to decide on a consistent approach for the
input_device
value in RetroArch's autoconfig files. Currently, these values vary significantly across different GNU/Linux distributions and kernel versions, making it challenging to maintain up-to-date configurations.Current Situation
The
input_device
value for the Nintendo Switch Pro Controller varies across different Ubuntu-based distributions and their derivatives:1: The controller name is used in RetroArch under Settings -> Input -> RetroPad Binds -> Port 1 Controls -> Save Controller Profile, generating a .cfg file (e.g., "udev/Foo.cfg") that includes an input_device entry with the controller name (e.g., input_device = Foo), which remains identical across all controller drivers (udev, sdl2, linuxraw) as specified in Settings -> Drivers -> Controller.
Problem
Updating the
input_device
value each time it changes in popular distributions is inconvenient and potentially error-prone. However, there might be benefits to keeping these values current. The situation is further complicated by the fact that distributions based on the same version (like Trisquel 11.0 based on Ubuntu 22.04) may have differentinput_device
values, possibly due to different package versions or distribution-specific modifications.Proposed Solutions
Use the earliest known value: Stick with "Pro Controller" as it appears in Ubuntu MATE 20.04.6 and Trisquel 11.0.
Use the latest known value: Adopt "Nintendo Co., Ltd. Pro Controller" from Ubuntu MATE 24.04.
Use a generic value: Choose a common denominator like "Nintendo Switch Pro Controller".
Implement a fallback system: Allow multiple
input_device
values per controller, checking them in order.Differentiate between HID and non-HID variants:
Nintendo Switch Pro Controller.cfg
(HID supported): Use the latest name (e.g., "Nintendo Co., Ltd. Pro Controller" or "Nintendo Switch Pro Controller")Nintendo Switch Pro Controller (default-off).cfg
(not HID supported): Use "Pro Controller"This approach accounts for both variants and supports older distributions like Ubuntu MATE 20.04.6 and Trisquel 11.0. However, it may disrupt alphabetical sorting of the files.
For HID-supported devices, using "Nintendo Co., Ltd. Pro Controller" may be preferable as it reflects the most current naming convention in the latest distributions. This approach reduces the likelihood of users with updated systems uploading new autoconfig files, thinking the existing ones are outdated. For non-HID devices, "Pro Controller" remains the best choice to maintain compatibility with older systems. This dual naming strategy balances accuracy for modern systems with backward compatibility for older ones.
Questions to Consider
input_device
values?input_device
value, given the differences observed between Ubuntu-based distributions?Related Pull Requests
Nintendo Switch Pro Controller.cfg
#1156sdl2/Nintendo Switch Pro Controller (old).cfg
updated #1154Nntendo Co., Ltd. Pro Controller (old).cfg
toNintendo Co., Ltd. Pro Controller (default-off).cfg
#1153We need to decide on the best approach moving forward to ensure consistent and reliable controller autoconfig across various GNU/Linux distributions and their derivatives while considering both HID and non-HID variants of the Nintendo Switch Pro Controller.
Additional Considerations
input_device
values in derivative distributions.Your input and discussion on these points are crucial for determining the most effective solution for the RetroArch community.
The text was updated successfully, but these errors were encountered: