From 3d221f2c993e591065a3c0cfb859005aee9fed5f Mon Sep 17 00:00:00 2001 From: zoltanvb <101990835+zoltanvb@users.noreply.github.com> Date: Mon, 4 Nov 2024 00:59:30 +0100 Subject: [PATCH] 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. --- configuration.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configuration.c b/configuration.c index c909350226..10c216296e 100644 --- a/configuration.c +++ b/configuration.c @@ -5190,10 +5190,10 @@ bool config_save_autoconf_profile(const config_set_string(conf, "input_driver", joypad_driver); 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); - vid_user = input_config_get_device_vid(user); + pid_user = input_config_get_device_pid(settings->uints.input_joypad_index[user]); + vid_user = input_config_get_device_vid(settings->uints.input_joypad_index[user]); if (pid_user && vid_user) {