Skip to content

Commit aadd2f4

Browse files
Input: Assign profile name correctly on save (#1217)
1 parent 149fe10 commit aadd2f4

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/input/InputManager.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -472,15 +472,12 @@ bool InputManager::save(size_t player_index, std::string_view filename)
472472
emulated_controller->type_string()
473473
}.c_str());
474474

475-
if (emulated_controller->has_profile_name())
476-
emulated_controller_node.append_child("profile").append_child(pugi::node_pcdata).set_value(
477-
emulated_controller->get_profile_name().c_str());
478-
else if (!is_default_file)
479-
{
475+
if(!is_default_file)
480476
emulated_controller->m_profile_name = std::string{filename};
477+
478+
if (emulated_controller->has_profile_name())
481479
emulated_controller_node.append_child("profile").append_child(pugi::node_pcdata).set_value(
482480
emulated_controller->get_profile_name().c_str());
483-
}
484481

485482
// custom settings
486483
emulated_controller->save(emulated_controller_node);

0 commit comments

Comments
 (0)