diff --git a/source/list/list.cpp b/source/list/list.cpp index 16562935..9b6f25f7 100644 --- a/source/list/list.cpp +++ b/source/list/list.cpp @@ -237,12 +237,12 @@ void CList::GetHeaders(safe_vector pathlist, safe_vector::GetHeaders(safe_vector pathlist, safe_vector::GetHeaders(safe_vector pathlist, safe_vectorPathToDriveType((*itr).c_str()); wbfs_t* handle = DeviceHandler::Instance()->GetWbfsHandle(partition); - if (!handle) return; + if (!handle) + return; s32 ret = wbfs_get_disc_info(handle, count, (u8 *)&tmp.hdr, sizeof(struct discHdr), NULL); count++; - if(ret != 0) continue; + if(ret != 0) + continue; - if (tmp.hdr.magic == 0x5D1C9EA3 && memcmp(tmp.hdr.id, "__CFG_", sizeof tmp.hdr.id) != 0) + GTitle = custom_titles.getString("TITLES", (const char *) tmp.hdr.id); + int ccolor = custom_titles.getColor("COVERS", (const char *) tmp.hdr.id, 1).intVal(); + + if(GTitle.size() > 0 || (gameTDB.IsLoaded() && gameTDB.GetTitle((char *)tmp.hdr.id, GTitle))) { - // Get info from custom titles - GTitle = custom_titles.getString("TITLES", (const char *) tmp.hdr.id); - int ccolor = custom_titles.getColor("COVERS", (const char *) tmp.hdr.id, tmp.hdr.casecolor).intVal(); - if(GTitle.size() > 0 || (gameTDB.GetTitle((char *)tmp.hdr.id, GTitle))) - { - mbstowcs(tmp.title, GTitle.c_str(), sizeof(tmp.title)); - tmp.hdr.casecolor = ccolor != 1 ? ccolor : gameTDB.GetCaseColor((char *)tmp.hdr.id); - - tmp.hdr.wifi = gameTDB.GetWifiPlayers((char *)tmp.hdr.id); - tmp.hdr.players = gameTDB.GetPlayers((char *)tmp.hdr.id); - //tmp.hdr.controllers = gameTDB.GetAccessories((char *)tmp.hdr.id); + mbstowcs(tmp.title, GTitle.c_str(), sizeof(tmp.title)); + tmp.hdr.casecolor = ccolor != 1 ? ccolor : gameTDB.GetCaseColor((char *)tmp.hdr.id); + tmp.hdr.wifi = gameTDB.GetWifiPlayers((char *)tmp.hdr.id); + tmp.hdr.players = gameTDB.GetPlayers((char *)tmp.hdr.id); - } - else + //tmp.hdr.controllers = gameTDB.GetAccessories((char *)tmp.hdr.id); + if (tmp.hdr.magic == 0x5D1C9EA3) { - mbstowcs(tmp.title, tmp.hdr.title, sizeof(tmp.title)); - tmp.hdr.casecolor = ccolor != 1 ? ccolor : 1; + Asciify(tmp.title); + headerlist.push_back(tmp); } + continue; + } + + if (tmp.hdr.magic == 0x5D1C9EA3) + { + mbstowcs(tmp.title, (const char *)tmp.hdr.title, sizeof(tmp.hdr.title)); Asciify(tmp.title); + tmp.hdr.casecolor = ccolor != 1 ? ccolor : 1; headerlist.push_back(tmp); - } + } continue; } }