mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 12:35:27 +00:00
DiscList section for the gameconfig files
Later it will be used to autodetect the next disc it should change to. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1657 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
520f7d16e1
commit
3fd665502e
@ -49,7 +49,8 @@ const char *PatchTypeStrings[] =
|
||||
|
||||
std::vector<Patch> onFrame;
|
||||
std::map<u32, int> speedHacks;
|
||||
|
||||
std::vector<std::string> discList;
|
||||
|
||||
void LoadPatchSection(const char *section, std::vector<Patch> &patches, IniFile &ini)
|
||||
{
|
||||
std::vector<std::string> lines;
|
||||
@ -98,6 +99,20 @@ void LoadPatchSection(const char *section, std::vector<Patch> &patches, IniFile
|
||||
}
|
||||
if (currentPatch.name.size()) patches.push_back(currentPatch);
|
||||
}
|
||||
|
||||
static void LoadDiscList(const char *section, std::vector<std::string> &_discList, IniFile &ini) {
|
||||
|
||||
std::vector<std::string> lines;
|
||||
if (!ini.GetLines(section, lines))
|
||||
return;
|
||||
|
||||
for (std::vector<std::string>::const_iterator iter = lines.begin(); iter != lines.end(); ++iter)
|
||||
{
|
||||
std::string line = *iter;
|
||||
if (line.size())
|
||||
_discList.push_back(line);
|
||||
}
|
||||
}
|
||||
|
||||
static void LoadSpeedhacks(const char *section, std::map<u32, int> &hacks, IniFile &ini) {
|
||||
std::vector<std::string> keys;
|
||||
@ -138,6 +153,7 @@ void LoadPatches(const char *gameID)
|
||||
LoadPatchSection("OnFrame", onFrame, ini);
|
||||
ActionReplay::LoadCodes(ini, false);
|
||||
LoadSpeedhacks("Speedhacks", speedHacks, ini);
|
||||
LoadDiscList("DiscList", discList, ini);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user