mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 21:54:15 +01:00
-updated scummvm ini parser, more stable and doesnt
codedump when returning to wiiflow anymore
This commit is contained in:
parent
bd15f4711d
commit
576ffcddd9
@ -120,16 +120,14 @@ safe_vector<dir_discHdr> Plugin::ParseScummvmINI(Config &ini, string Device)
|
||||
if(!ini.loaded())
|
||||
return gameHeader;
|
||||
string game = ini.firstDomain().c_str();
|
||||
if(Device.rfind("usb") != string::npos)
|
||||
Device.erase(3, 1);
|
||||
dir_discHdr tmp;
|
||||
while(1)
|
||||
{
|
||||
if(game == emptyString)
|
||||
break;
|
||||
if(strncasecmp(game.c_str(), "/", 1) == 0 ||
|
||||
strncasecmp(lowerCase(ini.getString(game,"description")).c_str(), "/", 1) == 0 ||
|
||||
lowerCase(ini.getStrings(game, "path", '/')[0]).rfind(Device.c_str()) == string::npos)
|
||||
strncasecmp(ini.getString(game,"description").c_str(), "/", 1) == 0 ||
|
||||
strncasecmp(ini.getWString(game, "path").toUTF8().c_str(), Device.c_str(), 3) != 0)
|
||||
{
|
||||
game = ini.nextDomain();
|
||||
continue;
|
||||
@ -140,7 +138,7 @@ safe_vector<dir_discHdr> Plugin::ParseScummvmINI(Config &ini, string Device)
|
||||
tmpString.fromUTF8(ini.getString(game,"description").c_str());
|
||||
wcsncpy(tmp.title, tmpString.c_str(), 64);
|
||||
strncpy(tmp.path, game.c_str(), sizeof(tmp.path));
|
||||
gprintf("Found: %s\n", tmpString.c_str());
|
||||
gprintf("Found: %ls\n", tmp.title);
|
||||
tmp.hdr.magic = magicWords.back();
|
||||
tmp.hdr.gc_magic = 0x4c4f4c4f;
|
||||
gameHeader.push_back(tmp);
|
||||
|
Loading…
Reference in New Issue
Block a user