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,6 +49,7 @@ const char *PatchTypeStrings[] =
|
||||||
|
|
||||||
std::vector<Patch> onFrame;
|
std::vector<Patch> onFrame;
|
||||||
std::map<u32, int> speedHacks;
|
std::map<u32, int> speedHacks;
|
||||||
|
std::vector<std::string> discList;
|
||||||
|
|
||||||
void LoadPatchSection(const char *section, std::vector<Patch> &patches, IniFile &ini)
|
void LoadPatchSection(const char *section, std::vector<Patch> &patches, IniFile &ini)
|
||||||
{
|
{
|
||||||
|
@ -99,6 +100,20 @@ void LoadPatchSection(const char *section, std::vector<Patch> &patches, IniFile
|
||||||
if (currentPatch.name.size()) patches.push_back(currentPatch);
|
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) {
|
static void LoadSpeedhacks(const char *section, std::map<u32, int> &hacks, IniFile &ini) {
|
||||||
std::vector<std::string> keys;
|
std::vector<std::string> keys;
|
||||||
ini.GetKeys(section, keys);
|
ini.GetKeys(section, keys);
|
||||||
|
@ -138,6 +153,7 @@ void LoadPatches(const char *gameID)
|
||||||
LoadPatchSection("OnFrame", onFrame, ini);
|
LoadPatchSection("OnFrame", onFrame, ini);
|
||||||
ActionReplay::LoadCodes(ini, false);
|
ActionReplay::LoadCodes(ini, false);
|
||||||
LoadSpeedhacks("Speedhacks", speedHacks, ini);
|
LoadSpeedhacks("Speedhacks", speedHacks, ini);
|
||||||
|
LoadDiscList("DiscList", discList, ini);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue