mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
-fixed auto ios selection
This commit is contained in:
parent
550ac3356b
commit
b3333735c8
@ -299,17 +299,17 @@ static u8 GetRequestedGameIOS(dir_discHdr *hdr)
|
||||
{
|
||||
u8 IOS = 0;
|
||||
|
||||
DeviceHandle.OpenWBFS(currentPartition);
|
||||
wbfs_disc_t *disc = WBFS_OpenDisc((u8 *) &hdr->id, (char *) hdr->path);
|
||||
if (!disc) return IOS;
|
||||
|
||||
if(disc != NULL)
|
||||
{
|
||||
u8 *titleTMD = NULL;
|
||||
u32 tmd_size = wbfs_extract_file(disc, (char *) "TMD", (void **)&titleTMD);
|
||||
WBFS_CloseDisc(disc);
|
||||
|
||||
if(!titleTMD) return IOS;
|
||||
|
||||
if(tmd_size > 0x18B)
|
||||
if(titleTMD != NULL && tmd_size > 0x18B)
|
||||
IOS = titleTMD[0x18B];
|
||||
WBFS_CloseDisc(disc);
|
||||
}
|
||||
WBFS_Close();
|
||||
return IOS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user