From d8094e7f1ce00aa7e589aaae81e33b5db215ccd4 Mon Sep 17 00:00:00 2001 From: zoltanvb Date: Sun, 3 Nov 2024 16:08:55 +0100 Subject: [PATCH] Fix autoconf profile saving for devices not in their default port. 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 c9093502267..10c216296ef 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) {