Merge pull request #5855 from leoetlino/config-reload
Config: Reload game INI on title change
This commit is contained in:
commit
4dcc931d97
|
@ -241,12 +241,6 @@ bool BootCore(std::unique_ptr<BootParameters> boot)
|
|||
// Load game specific settings
|
||||
if (!std::holds_alternative<BootParameters::IPL>(boot->parameters))
|
||||
{
|
||||
std::string game_id = SConfig::GetInstance().GetGameID();
|
||||
u16 revision = SConfig::GetInstance().GetRevision();
|
||||
|
||||
Config::AddLayer(ConfigLoaders::GenerateGlobalGameConfigLoader(game_id, revision));
|
||||
Config::AddLayer(ConfigLoaders::GenerateLocalGameConfigLoader(game_id, revision));
|
||||
|
||||
IniFile game_ini = StartUp.LoadGameIni();
|
||||
|
||||
// General settings
|
||||
|
|
|
@ -791,6 +791,9 @@ void SConfig::SetRunningGameMetadata(const std::string& game_id, u64 title_id, u
|
|||
m_title_description = title_database.Describe(m_game_id, type);
|
||||
NOTICE_LOG(CORE, "Active title: %s", m_title_description.c_str());
|
||||
|
||||
Config::AddLayer(ConfigLoaders::GenerateGlobalGameConfigLoader(game_id, revision));
|
||||
Config::AddLayer(ConfigLoaders::GenerateLocalGameConfigLoader(game_id, revision));
|
||||
|
||||
if (Core::IsRunning())
|
||||
{
|
||||
// TODO: have a callback mechanism for title changes?
|
||||
|
|
Loading…
Reference in New Issue