Fix autoconf profile saving for devices not in their default port. (#17156)

User slot (player #) and joypad driver port is by default the same, but
it can be changed either manually or automatically (reserved device).
Use the correct index for detecting values associated with the port.
This commit is contained in:
zoltanvb 2024-11-04 00:59:30 +01:00 committed by GitHub
parent 7dfc001379
commit 3d221f2c99
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -5190,10 +5190,10 @@ bool config_save_autoconf_profile(const
config_set_string(conf, "input_driver", config_set_string(conf, "input_driver",
joypad_driver); joypad_driver);
config_set_string(conf, "input_device", config_set_string(conf, "input_device",
input_config_get_device_name(user)); input_config_get_device_name(settings->uints.input_joypad_index[user]));
pid_user = input_config_get_device_pid(user); pid_user = input_config_get_device_pid(settings->uints.input_joypad_index[user]);
vid_user = input_config_get_device_vid(user); vid_user = input_config_get_device_vid(settings->uints.input_joypad_index[user]);
if (pid_user && vid_user) if (pid_user && vid_user)
{ {