From baad10593e60106848eef784aac6858e1178aa5f Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Thu, 4 Feb 2016 20:25:56 +1300 Subject: [PATCH] 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. --- Source/Core/Core/ConfigManager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp index 20c62d8f8f..ae363bb890 100644 --- a/Source/Core/Core/ConfigManager.cpp +++ b/Source/Core/Core/ConfigManager.cpp @@ -973,6 +973,12 @@ std::vector SConfig::GetGameIniFilenames(const std::string& id, u16 { std::vector 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 if (id.size() >= 4) filenames.push_back(id.substr(0, 3) + ".ini");