mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-24 19:01:56 +01:00
* Finally fixed black box issue for WBFS partition users (Thanks guys for testing over and over agian :P)
This commit is contained in:
parent
6e4f6d5288
commit
5e9e89b772
@ -237,12 +237,12 @@ void CList<dir_discHdr>::GetHeaders(safe_vector<string> pathlist, safe_vector<di
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(wbfs)
|
/*if(wbfs)
|
||||||
{
|
{
|
||||||
wbfs_t *part = WBFS_Ext_OpenPart((char *)(*itr).c_str());
|
wbfs_t *part = WBFS_Ext_OpenPart((char *)(*itr).c_str());
|
||||||
if (!part) continue;
|
if (!part) continue;
|
||||||
|
|
||||||
/* Get header */
|
// Get header
|
||||||
if(wbfs_get_disc_info(part, 0, (u8*)&tmp.hdr, sizeof(discHdr), NULL) == 0
|
if(wbfs_get_disc_info(part, 0, (u8*)&tmp.hdr, sizeof(discHdr), NULL) == 0
|
||||||
&& memcmp(tmp.hdr.id, "__CFG_", sizeof tmp.hdr.id) != 0)
|
&& memcmp(tmp.hdr.id, "__CFG_", sizeof tmp.hdr.id) != 0)
|
||||||
{
|
{
|
||||||
@ -253,7 +253,7 @@ void CList<dir_discHdr>::GetHeaders(safe_vector<string> pathlist, safe_vector<di
|
|||||||
}
|
}
|
||||||
WBFS_Ext_ClosePart(part);
|
WBFS_Ext_ClosePart(part);
|
||||||
continue;
|
continue;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
else if((*itr).rfind(".dol") != string::npos || (*itr).rfind(".DOL") != string::npos
|
else if((*itr).rfind(".dol") != string::npos || (*itr).rfind(".DOL") != string::npos
|
||||||
|| (*itr).rfind(".elf") != string::npos || (*itr).rfind(".ELF") != string::npos)
|
|| (*itr).rfind(".elf") != string::npos || (*itr).rfind(".ELF") != string::npos)
|
||||||
@ -308,35 +308,40 @@ void CList<dir_discHdr>::GetHeaders(safe_vector<string> pathlist, safe_vector<di
|
|||||||
{
|
{
|
||||||
u8 partition = DeviceHandler::Instance()->PathToDriveType((*itr).c_str());
|
u8 partition = DeviceHandler::Instance()->PathToDriveType((*itr).c_str());
|
||||||
wbfs_t* handle = DeviceHandler::Instance()->GetWbfsHandle(partition);
|
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);
|
s32 ret = wbfs_get_disc_info(handle, count, (u8 *)&tmp.hdr, sizeof(struct discHdr), NULL);
|
||||||
count++;
|
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
|
mbstowcs(tmp.title, GTitle.c_str(), sizeof(tmp.title));
|
||||||
GTitle = custom_titles.getString("TITLES", (const char *) tmp.hdr.id);
|
tmp.hdr.casecolor = ccolor != 1 ? ccolor : gameTDB.GetCaseColor((char *)tmp.hdr.id);
|
||||||
int ccolor = custom_titles.getColor("COVERS", (const char *) tmp.hdr.id, tmp.hdr.casecolor).intVal();
|
tmp.hdr.wifi = gameTDB.GetWifiPlayers((char *)tmp.hdr.id);
|
||||||
if(GTitle.size() > 0 || (gameTDB.GetTitle((char *)tmp.hdr.id, GTitle)))
|
tmp.hdr.players = gameTDB.GetPlayers((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);
|
|
||||||
//tmp.hdr.controllers = gameTDB.GetAccessories((char *)tmp.hdr.id);
|
|
||||||
|
|
||||||
}
|
//tmp.hdr.controllers = gameTDB.GetAccessories((char *)tmp.hdr.id);
|
||||||
else
|
if (tmp.hdr.magic == 0x5D1C9EA3)
|
||||||
{
|
{
|
||||||
mbstowcs(tmp.title, tmp.hdr.title, sizeof(tmp.title));
|
Asciify(tmp.title);
|
||||||
tmp.hdr.casecolor = ccolor != 1 ? ccolor : 1;
|
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);
|
Asciify(tmp.title);
|
||||||
|
tmp.hdr.casecolor = ccolor != 1 ? ccolor : 1;
|
||||||
headerlist.push_back(tmp);
|
headerlist.push_back(tmp);
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user