From 3fd665502e7956ebd97391c0f4cc907d70358968 Mon Sep 17 00:00:00 2001 From: nakeee Date: Thu, 25 Dec 2008 12:02:09 +0000 Subject: [PATCH] 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 --- Source/Core/Core/Src/PatchEngine.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Source/Core/Core/Src/PatchEngine.cpp b/Source/Core/Core/Src/PatchEngine.cpp index 9a69adff9b..026bab2f69 100644 --- a/Source/Core/Core/Src/PatchEngine.cpp +++ b/Source/Core/Core/Src/PatchEngine.cpp @@ -49,7 +49,8 @@ const char *PatchTypeStrings[] = std::vector onFrame; std::map speedHacks; - +std::vector discList; + void LoadPatchSection(const char *section, std::vector &patches, IniFile &ini) { std::vector lines; @@ -98,6 +99,20 @@ void LoadPatchSection(const char *section, std::vector &patches, IniFile } if (currentPatch.name.size()) patches.push_back(currentPatch); } + +static void LoadDiscList(const char *section, std::vector &_discList, IniFile &ini) { + + std::vector lines; + if (!ini.GetLines(section, lines)) + return; + + for (std::vector::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 &hacks, IniFile &ini) { std::vector 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); } }