Skip to content

Commit

Permalink
Input: Assign profile name correctly on save (#1217)
Browse files Browse the repository at this point in the history
  • Loading branch information
goeiecool9999 authored May 24, 2024
1 parent 149fe10 commit aadd2f4
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 aadd2f4

Please sign in to comment.