Skip to content

Commit

Permalink
InputManager: Assign profile name correctly on save
Browse files Browse the repository at this point in the history
  • Loading branch information
goeiecool9999 committed May 22, 2024
1 parent b048a1f commit b5c1ae5
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/input/InputManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b5c1ae5

Please sign in to comment.