-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Autoconfig extension with alternative name/vid/pid #16990
Autoconfig extension with alternative name/vid/pid #16990
Conversation
If there are several variants of a controller, but their button layout is exactly the same, allow alternative identifiers, e.g.: input_device_alt1 input_vendor_id_alt3 input_product_id_alt9
Thank you very much, as always, Zoltanvb. You have been instrumental in helping me achieve my goals!:
There's just one last detail to address in the "[IMPORTANT feature request]: Support multiple input_device, input_device_display_name..." issue. Please ensure that you can accommodate alternative input_device_display_name variables. |
Merged to Nintendo Switch Pro Controller.cfg See libretro/RetroArch#16990
Merged to Nintendo Switch Pro Controller.cfg See libretro/RetroArch#16990
Merged to Sony Interactive Entertainment Wireless Controller.cfg See libretro/RetroArch#16990
Merged to Sony Interactive Entertainment DualSense Wireless Controller.cfg See libretro/RetroArch#16990
Merged to Wireless Controller.cfg See libretro/RetroArch#16990
Merged to Wireless Controller.cfg See libretro/RetroArch#16990
Merged v1 and v2 libretro/RetroArch#16990
just to clarify, if for example a .cfg provides
but not in other words, do i ned to provide |
Yes, input_device_alt1 is needed. Each set of (input_device, input_vendor_id, input_product_id) is treated as a separate entity. |
Description
There may be several variants of a controller, where name and/or vid:pid is different, but their button layout is exactly the same (for one example,
Microsoft X-Box pad v1 (US)
andMicrosoft X-Box pad v2 (US)
in udev).Allow up to 9 alternative values in the autoconfig file for the 3 config entries used for identification, e.g.:
The matching against the alternative identifiers is done exactly the same way as for primary identifiers (affinity calculation).
Note: contrary to the linked request, there is only one display name supported. The reason is that this way, code changes are quite limited and do not spread to any other function. Since this PR just enables reducing number of autoconfig files, I wanted to keep changes and future code maintenance increase to a minimum.
Omitting the display name will keep the name contained in input_device (whichever alternative matched). Change is not driver specific and is valid for any controller driver. Existing driver limitations still apply (i.e. linuxraw driver can not extract vid:pid).
Autoconfig file generation does not change. Any merge of matching autoconfigs must be done manually. Existing autoconfigs are good as-is.
Test supplied using test input driver:
retroarch --appendconfig tests-other/testinput_alternative_autoconfig.cfg\|tests-other/all_binds_empty.cfg
Related Issues
Closes #16907
Reviewers
@davidhedlund
@RobLoach (in case verify_duplicate_profiles CI script would be incompatible with this)