input: fix pad profile override with existing custom pad configs

This commit is contained in:
Megamouse 2023-06-06 03:55:53 +02:00
parent 6d2f7f6e54
commit 292d3faa9e
2 changed files with 14 additions and 11 deletions

View file

@ -103,19 +103,14 @@ void pad_thread::Init()
g_cfg_profile.load();
std::string active_profile = g_pad_profile_override;
std::string active_profile = g_cfg_profile.active_profiles.get_value(pad::g_title_id);
if (active_profile.empty())
{
active_profile = g_cfg_profile.active_profiles.get_value(pad::g_title_id);
if (active_profile.empty())
{
active_profile = g_cfg_profile.active_profiles.get_value(g_cfg_profile.global_key);
}
active_profile = g_cfg_profile.active_profiles.get_value(g_cfg_profile.global_key);
}
input_log.notice("Using pad profile: '%s'", active_profile);
input_log.notice("Using pad profile: '%s' (override='%s')", active_profile, g_pad_profile_override);
// Load in order to get the pad handlers
if (!g_cfg_input.load(pad::g_title_id, active_profile))