CommonHostInterface: Move input map update to frontend
Fixes controller state getting reset when loading input profile.
This commit is contained in:
parent
ad0d16e243
commit
4fafb34251
|
@ -822,6 +822,7 @@ bool AndroidHostInterface::ApplyInputProfile(const char* profile_name)
|
||||||
|
|
||||||
Assert(!IsEmulationThreadRunning() || IsEmulationThreadPaused());
|
Assert(!IsEmulationThreadRunning() || IsEmulationThreadPaused());
|
||||||
CommonHostInterface::ApplyInputProfile(path.c_str(), m_settings_interface);
|
CommonHostInterface::ApplyInputProfile(path.c_str(), m_settings_interface);
|
||||||
|
ApplySettings(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -767,8 +767,17 @@ void QtHostInterface::applyInputProfile(const QString& profile_path)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Settings old_settings(std::move(g_settings));
|
||||||
|
{
|
||||||
std::lock_guard<std::recursive_mutex> lock(m_settings_mutex);
|
std::lock_guard<std::recursive_mutex> lock(m_settings_mutex);
|
||||||
ApplyInputProfile(profile_path.toUtf8().data(), *m_settings_interface.get());
|
CommonHostInterface::ApplyInputProfile(profile_path.toUtf8().data(), *m_settings_interface.get());
|
||||||
|
CommonHostInterface::LoadSettings(*m_settings_interface.get());
|
||||||
|
CommonHostInterface::ApplyGameSettings(false);
|
||||||
|
CommonHostInterface::FixIncompatibleSettings(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
CheckForSettingsChanges(old_settings);
|
||||||
|
|
||||||
emit inputProfileLoaded();
|
emit inputProfileLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1880,11 +1880,6 @@ void CommonHostInterface::ApplyInputProfile(const char* profile_path, SettingsIn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (System::IsValid())
|
|
||||||
System::UpdateControllers();
|
|
||||||
|
|
||||||
UpdateInputMap(si);
|
|
||||||
|
|
||||||
ReportFormattedMessage(TranslateString("OSDMessage", "Loaded input profile from '%s'"), profile_path);
|
ReportFormattedMessage(TranslateString("OSDMessage", "Loaded input profile from '%s'"), profile_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue