mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-23 20:02:45 -06:00
Warp back to 5578. Sorry for the lost changes, please re-apply. Reason: 5579 is a complete disaster.
Not only does it change tons of files to switch to a new and non-working (it doesn't parse my ini files, at least) ini parser, it also reshuffles a lot of code and removes a plugin. The latter part is fine, but doing these two major switches in one revision, one of which is broken, is completely unacceptable. I said to merge tiny changes, not massive reworkings. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5589 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -55,13 +55,12 @@ std::vector<std::string> discList;
|
||||
|
||||
void LoadPatchSection(const char *section, std::vector<Patch> &patches, IniFile &ini)
|
||||
{
|
||||
//if (!ini.Exists(section))
|
||||
//return;
|
||||
std::vector<std::string> lines;
|
||||
if (!ini.GetLines(section, lines))
|
||||
return;
|
||||
|
||||
Patch currentPatch;
|
||||
|
||||
std::vector<std::string> lines;
|
||||
ini[section].GetLines(lines);
|
||||
for (std::vector<std::string>::const_iterator iter = lines.begin(); iter != lines.end(); ++iter)
|
||||
{
|
||||
std::string line = *iter;
|
||||
@ -100,14 +99,15 @@ 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;
|
||||
ini[section].GetLines(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;
|
||||
@ -117,18 +117,19 @@ static void LoadDiscList(const char *section, std::vector<std::string> &_discLis
|
||||
}
|
||||
|
||||
static void LoadSpeedhacks(const char *section, std::map<u32, int> &hacks, IniFile &ini) {
|
||||
Section& sect = ini[section];
|
||||
for (Section::const_iterator iter = sect.begin(); iter != sect.end(); ++iter)
|
||||
std::vector<std::string> keys;
|
||||
ini.GetKeys(section, keys);
|
||||
for (std::vector<std::string>::const_iterator iter = keys.begin(); iter != keys.end(); ++iter)
|
||||
{
|
||||
const std::string& key = iter->first;
|
||||
std::string key = *iter;
|
||||
std::string value;
|
||||
sect.Get(key, &value, "BOGUS");
|
||||
ini.Get(section, key.c_str(), &value, "BOGUS");
|
||||
if (value != "BOGUS")
|
||||
{
|
||||
u32 address;
|
||||
u32 cycles;
|
||||
bool success = true;
|
||||
success = success && TryParseUInt(std::string(key.c_str()), &address); // std::string(.c_str()); // what?
|
||||
success = success && TryParseUInt(std::string(key.c_str()), &address);
|
||||
success = success && TryParseUInt(value, &cycles);
|
||||
if (success) {
|
||||
speedHacks[address] = (int)cycles;
|
||||
|
Reference in New Issue
Block a user