Autoconfig extension with alternative name/vid/pid#16990
Autoconfig extension with alternative name/vid/pid#16990LibretroAdmin merged 1 commit intolibretro:masterfrom
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. |
|
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. |
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
…roller.cfg * Merge Sony_DualShock_4_Controller.cfg (v1) and v2 by using alternative vid/pid: libretro/RetroArch#16990 * The merged autoconfigs makes the Sony DualShock 4 Controller v1 use correct mappings - Sony_DualShock_4_Controller.cfg file used `input_menu_toggle_btn = "109"` which is now set to `input_menu_toggle_btn = "110"` in `Wireless Controller.cfg`: Changes the menu button from the Touchpad (does not work at all) to the PS button. - Sony_DualShock_4_Controller.cfg file used `input_select_btn = "4"` which is now set to `input_select_btn = "109"` in `Wireless Controller.cfg` * Renamed the controller to the official name generated by RetroArch. * Added " Trigger" to the labels for the triggers.
Merged `Sony_DualShock_4_Controller.cfg` to `Wireless Controller.cfg`; Merged Sony_DualShock_4_Controller.cfg (v1) and v2 by using alternative vid/pid: libretro/RetroArch#16990 See commit * d6b8ed1
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.cfgRelated Issues
Closes #16907
Reviewers
@davidhedlund
@RobLoach (in case verify_duplicate_profiles CI script would be incompatible with this)