GameInis: Allow one ini to cover all VC games for a console

Since all Virtual console releases use the same emulator (though there
are multiple revisions some emulators) and generally need the same
setting, this commit allows the creation of INI files which cover all
Virtual Console games fow each system.

For example, F.ini can provide settings that all NES games have in common
and C.ini will provide settings for all Commadore 64 games.

If needed, a 3 letter ini can override settings for individual games.
This commit is contained in:
Scott Mansell 2016-02-04 20:25:56 +13:00
parent 2282651fdb
commit baad10593e
1 changed files with 6 additions and 0 deletions

View File

@ -973,6 +973,12 @@ std::vector<std::string> SConfig::GetGameIniFilenames(const std::string& id, u16
{ {
std::vector<std::string> filenames; std::vector<std::string> filenames;
if (id.empty())
return filenames;
// INIs that match the system code (unique for each Virtual Console system)
filenames.push_back(id.substr(0, 1) + ".ini");
// INIs that match all regions // INIs that match all regions
if (id.size() >= 4) if (id.size() >= 4)
filenames.push_back(id.substr(0, 3) + ".ini"); filenames.push_back(id.substr(0, 3) + ".ini");