mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-27 13:44:15 +01:00
-dont use frag list on wbfs partitions, they are not needed
-fixed booting games from wbfs via waninkoko cIOS r17 or older -fixed partition handle wbfs detection
This commit is contained in:
parent
8d099e9041
commit
0b1562fcdf
@ -152,8 +152,7 @@ bool PartitionHandle::Mount(int pos, const char * name, bool forceFAT)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if(strncmp(GetFSName(pos), "NTFS", 4) == 0 || strcmp(GetFSName(pos), "GUID-Entry") == 0)
|
||||
else if(strncmp(GetFSName(pos), "NTFS", 4) == 0 || strcmp(GetFSName(pos), "GUID-Entry") == 0)
|
||||
{
|
||||
if(ntfsMount(MountNameList[pos].c_str(), interface, GetLBAStart(pos), CACHE, SECTORS, NTFS_SHOW_HIDDEN_FILES | NTFS_RECOVER))
|
||||
{
|
||||
@ -161,8 +160,7 @@ bool PartitionHandle::Mount(int pos, const char * name, bool forceFAT)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if(strncmp(GetFSName(pos), "LINUX", 5) == 0 || strcmp(GetFSName(pos), "GUID-Entry") == 0)
|
||||
else if(strncmp(GetFSName(pos), "LINUX", 5) == 0 || strcmp(GetFSName(pos), "GUID-Entry") == 0)
|
||||
{
|
||||
if(ext2Mount(MountNameList[pos].c_str(), interface, GetLBAStart(pos), CACHE, SECTORS, EXT2_FLAG_DEFAULT))
|
||||
{
|
||||
@ -177,7 +175,10 @@ bool PartitionHandle::Mount(int pos, const char * name, bool forceFAT)
|
||||
else if(interface == &__io_sdhc)
|
||||
SetWbfsHandle(pos, wbfs_open_partition(__WBFS_ReadSDHC, __WBFS_WriteSDHC, NULL, 512, GetSecCount(pos), GetLBAStart(pos), 0));
|
||||
if(GetWbfsHandle(pos))
|
||||
{
|
||||
PartitionList[pos].FSName = "WBFS";
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
MountNameList[pos].clear();
|
||||
|
@ -299,15 +299,15 @@ s32 Disc_Wait(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 Disc_SetUSB(const u8 *id)
|
||||
s32 Disc_SetUSB(const u8 *id, bool frag)
|
||||
{
|
||||
if(id)
|
||||
if(id && frag)
|
||||
return set_frag_list((u8 *) id);
|
||||
|
||||
s32 part = -1;
|
||||
if(is_ios_type(IOS_TYPE_HERMES, IOS_GetVersion()))
|
||||
part = wbfs_part_idx ? wbfs_part_idx - 1 : 0;
|
||||
return WDVD_SetUSBMode(wbfsDev, (u8 *) id, part);
|
||||
return WDVD_SetUSBMode(wbfsDev, (u8*)id, part);
|
||||
}
|
||||
|
||||
s32 Disc_ReadHeader(void *outbuf)
|
||||
|
@ -97,7 +97,7 @@ extern "C" {
|
||||
s32 Disc_Init(void);
|
||||
s32 Disc_Open(bool);
|
||||
s32 Disc_Wait(void);
|
||||
s32 Disc_SetUSB(const u8 *);
|
||||
s32 Disc_SetUSB(const u8 *id, bool frag);
|
||||
s32 Disc_ReadHeader(void *);
|
||||
s32 Disc_ReadGCHeader(void *);
|
||||
s32 Disc_Type(bool);
|
||||
|
@ -1152,7 +1152,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
#ifndef DOLPHIN
|
||||
if(!neek2o())
|
||||
{
|
||||
Disc_SetUSB(NULL);
|
||||
Disc_SetUSB(NULL, false);
|
||||
if (WDVD_GetCoverStatus(&cover) < 0)
|
||||
{
|
||||
error(_t("errgame7", L"WDVDGetCoverStatus Failed!"));
|
||||
@ -1281,7 +1281,8 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
Nand::Instance()->Do_Region_Change(id);
|
||||
}
|
||||
}
|
||||
if(!dvd && get_frag_list((u8 *)id.c_str(), (char*)path.c_str(), currentPartition == 0 ? 0x200 : USBStorage2_GetSectorSize()) < 0)
|
||||
bool wbfs_partition = (DeviceHandler::Instance()->GetFSType(currentPartition) == PART_FS_WBFS);
|
||||
if(!dvd && !wbfs_partition && get_frag_list((u8 *)id.c_str(), (char*)path.c_str(), currentPartition == 0 ? 0x200 : USBStorage2_GetSectorSize()) < 0)
|
||||
return;
|
||||
|
||||
u8 patchVidMode = min((u32)m_gcfg2.getInt(id, "patch_video_modes", 0), ARRAY_SIZE(CMenu::_vidModePatch) - 1u);
|
||||
@ -1383,7 +1384,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
}
|
||||
if(!dvd)
|
||||
{
|
||||
s32 ret = Disc_SetUSB((u8 *)id.c_str());
|
||||
s32 ret = Disc_SetUSB((u8*)id.c_str(), !wbfs_partition);
|
||||
if (ret < 0)
|
||||
{
|
||||
gprintf("Set USB failed: %d\n", ret);
|
||||
|
@ -312,7 +312,7 @@ bool CMenu::_wbfsOp(CMenu::WBFS_OP op)
|
||||
m_btnMgr.hide(m_wbfsBtnBack);
|
||||
m_btnMgr.show(m_wbfsLblMessage);
|
||||
m_btnMgr.setText(m_wbfsLblMessage, L"");
|
||||
Disc_SetUSB(NULL);
|
||||
Disc_SetUSB(NULL, false);
|
||||
if (Disc_Wait() < 0)
|
||||
{
|
||||
error(_t("wbfsoperr1", L"Disc_Wait failed"));
|
||||
|
Loading…
Reference in New Issue
Block a user