From aadd2f4a1af788d208a38a2d23161a4de517083a Mon Sep 17 00:00:00 2001 From: goeiecool9999 <7033575+goeiecool9999@users.noreply.github.com> Date: Sat, 25 May 2024 01:48:53 +0200 Subject: [PATCH] Input: Assign profile name correctly on save (#1217) --- src/input/InputManager.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/input/InputManager.cpp b/src/input/InputManager.cpp index d928e46c6..64b238fc9 100644 --- a/src/input/InputManager.cpp +++ b/src/input/InputManager.cpp @@ -472,15 +472,12 @@ bool InputManager::save(size_t player_index, std::string_view filename) emulated_controller->type_string() }.c_str()); - if (emulated_controller->has_profile_name()) - emulated_controller_node.append_child("profile").append_child(pugi::node_pcdata).set_value( - emulated_controller->get_profile_name().c_str()); - else if (!is_default_file) - { + if(!is_default_file) emulated_controller->m_profile_name = std::string{filename}; + + if (emulated_controller->has_profile_name()) emulated_controller_node.append_child("profile").append_child(pugi::node_pcdata).set_value( emulated_controller->get_profile_name().c_str()); - } // custom settings emulated_controller->save(emulated_controller_node);