Merge pull request #5855 from leoetlino/config-reload

Config: Reload game INI on title change
This commit is contained in:
Leo Lam 2017-08-01 13:40:05 +08:00 committed by GitHub
commit 4dcc931d97
2 changed files with 3 additions and 6 deletions

View File

@ -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

View File

@ -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?