CoreParameter: Support game INIs that match all regions

This commit is contained in:
JosJuice 2015-02-06 22:34:00 +01:00
parent 8670f2a627
commit 47e67f9696

View File

@ -399,7 +399,14 @@ IniFile SCoreStartupParameter::LoadGameIni() const
void SCoreStartupParameter::LoadGameIni(IniFile* game_ini, const std::string& path) const void SCoreStartupParameter::LoadGameIni(IniFile* game_ini, const std::string& path) const
{ {
// INIs that match all regions
if (GetUniqueID().size() >= 4)
game_ini->Load(path + GetUniqueID().substr(0, 3) + ".ini", true);
// Regular INIs
game_ini->Load(path + GetUniqueID() + ".ini", true); game_ini->Load(path + GetUniqueID() + ".ini", true);
// INIs with specific revisions
if (!m_strRevisionSpecificUniqueID.empty()) if (!m_strRevisionSpecificUniqueID.empty())
game_ini->Load(path + m_strRevisionSpecificUniqueID + ".ini", true); game_ini->Load(path + m_strRevisionSpecificUniqueID + ".ini", true);
} }