From 576ffcddd900b14b5165703ab9146782047273f4 Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Sun, 29 Apr 2012 12:33:24 +0000 Subject: [PATCH] -updated scummvm ini parser, more stable and doesnt codedump when returning to wiiflow anymore --- source/plugin/plugin.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/source/plugin/plugin.cpp b/source/plugin/plugin.cpp index 74528ba8..e67076a8 100644 --- a/source/plugin/plugin.cpp +++ b/source/plugin/plugin.cpp @@ -120,16 +120,14 @@ safe_vector 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 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);