Config: Fix returned game INI filenames for title IDs
Using the first letter or the 3 letters of the ID only makes sense if the ID is an actual game ID (which has 6 characters).
This commit is contained in:
parent
ed331918f0
commit
603762ec4d
|
@ -37,12 +37,16 @@ std::vector<std::string> GetGameIniFilenames(const std::string& id, std::optiona
|
||||||
if (id.empty())
|
if (id.empty())
|
||||||
return filenames;
|
return filenames;
|
||||||
|
|
||||||
// INIs that match the system code (unique for each Virtual Console system)
|
// Using the first letter or the 3 letters of the ID only makes sense
|
||||||
filenames.push_back(id.substr(0, 1) + ".ini");
|
// if the ID is an actual game ID (which has 6 characters).
|
||||||
|
if (id.length() == 6)
|
||||||
|
{
|
||||||
|
// 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)
|
|
||||||
filenames.push_back(id.substr(0, 3) + ".ini");
|
filenames.push_back(id.substr(0, 3) + ".ini");
|
||||||
|
}
|
||||||
|
|
||||||
// Regular INIs
|
// Regular INIs
|
||||||
filenames.push_back(id + ".ini");
|
filenames.push_back(id + ".ini");
|
||||||
|
|
Loading…
Reference in New Issue