mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-28 12:51:52 +01:00
-fixed wii game save emu when booting in ios58 mode and reload to cios
-speed up the wiiflow bootup a bit in ios58 mode
This commit is contained in:
parent
d8acff9fb0
commit
a5b2561401
@ -81,7 +81,6 @@ void Nand::Init()
|
||||
bool Nand::LoadDefaultIOS(void)
|
||||
{
|
||||
Patch_AHB();
|
||||
DeInit_ISFS();
|
||||
s32 ret = IOS_ReloadIOS(IOS_GetPreferredVersion());
|
||||
loadIOS(IOS_GetVersion(), false);
|
||||
Init_ISFS();
|
||||
|
@ -40,7 +40,7 @@ int main(int argc, char **argv)
|
||||
|
||||
char *gameid = NULL;
|
||||
bool Emulator_boot = false;
|
||||
bool iosOK = false;
|
||||
bool iosOK = true;
|
||||
|
||||
for(u8 i = 0; i < argc; i++)
|
||||
{
|
||||
@ -64,17 +64,18 @@ int main(int argc, char **argv)
|
||||
Emulator_boot = true;
|
||||
}
|
||||
/* Init ISFS */
|
||||
NandHandle.Init_ISFS();
|
||||
if(InternalSave.CheckSave()) /* Maybe new IOS settings */
|
||||
if(neek2o() || Sys_DolphinMode())
|
||||
NandHandle.Init_ISFS();
|
||||
else
|
||||
NandHandle.LoadDefaultIOS(); /* safe reload to preferred IOS */
|
||||
/* Maybe new IOS settings */
|
||||
if(InternalSave.CheckSave())
|
||||
InternalSave.LoadIOS();
|
||||
/* Handle (c)IOS Loading */
|
||||
if(neek2o() || Sys_DolphinMode()) /* wont reload anythin */
|
||||
iosOK = loadIOS(IOS_GetVersion(), false);
|
||||
else if(useMainIOS && CustomIOS(IOS_GetType(mainIOS))) /* Requested */
|
||||
iosOK = loadIOS(mainIOS, false) && CustomIOS(CurrentIOS.Type);
|
||||
else /* safe reload to preferred IOS */
|
||||
iosOK = NandHandle.LoadDefaultIOS();
|
||||
|
||||
// Init
|
||||
Sys_Init();
|
||||
Sys_ExitTo(EXIT_TO_HBC);
|
||||
|
@ -1265,7 +1265,6 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
int emuPartition = 0;
|
||||
|
||||
u8 emulate_mode = min((u32)m_gcfg2.getInt(id, "emulate_save", 0), ARRAY_SIZE(CMenu::_SaveEmu) - 1u);
|
||||
|
||||
if(emulate_mode == 0)
|
||||
{
|
||||
emulate_mode = min(max(0, m_cfg.getInt(WII_DOMAIN, "save_emulation", 0)), (int)ARRAY_SIZE(CMenu::_GlobalSaveEmu) - 1);
|
||||
@ -1274,7 +1273,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
}
|
||||
else if(emulate_mode == 1)
|
||||
emulate_mode = 0;
|
||||
if(emulate_mode && !dvd && !neek2o() && CurrentIOS.Type == IOS_TYPE_D2X)
|
||||
if(emulate_mode && !dvd && !neek2o())
|
||||
{
|
||||
emuPartition = _FindEmuPart(emuPath, false);
|
||||
if(emuPartition < 0)
|
||||
@ -1305,18 +1304,15 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
NANDemuView = true;
|
||||
m_cfg.setInt(WII_DOMAIN, "savepartition", emuPartition);
|
||||
m_cfg.setString(WII_DOMAIN, "savepath", emuPath);
|
||||
if(emulate_mode == 2 || emulate_mode > 3)
|
||||
if(emulate_mode == 2)
|
||||
{
|
||||
if(emulate_mode == 2)
|
||||
{
|
||||
m_forceext = false;
|
||||
_hideWaitMessage();
|
||||
if(!_AutoExtractSave(id))
|
||||
NandHandle.CreateTitleTMD(hdr);
|
||||
_showWaitMessage();
|
||||
}
|
||||
m_forceext = false;
|
||||
_hideWaitMessage();
|
||||
if(!_AutoExtractSave(id))
|
||||
NandHandle.CreateTitleTMD(hdr);
|
||||
_showWaitMessage();
|
||||
}
|
||||
if(emulate_mode > 2)
|
||||
else if(emulate_mode > 2)
|
||||
{
|
||||
NandHandle.CreateConfig();
|
||||
NandHandle.Do_Region_Change(id);
|
||||
@ -1368,28 +1364,28 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
if(_loadIOS(gameIOS, userIOS, id) == LOAD_IOS_FAILED)
|
||||
Sys_Exit();
|
||||
}
|
||||
if(CurrentIOS.Type == IOS_TYPE_D2X && returnTo != 0 && !m_directLaunch)
|
||||
if(CurrentIOS.Type == IOS_TYPE_D2X)
|
||||
{
|
||||
if(D2X_PatchReturnTo(returnTo) >= 0)
|
||||
if(returnTo != 0 && !m_directLaunch && D2X_PatchReturnTo(returnTo) >= 0)
|
||||
memset(&returnTo, 0, sizeof(u32));
|
||||
}
|
||||
if(emulate_mode)
|
||||
{
|
||||
/* Enable our Emu NAND */
|
||||
DeviceHandle.UnMountAll();
|
||||
if(emulate_mode == 3)
|
||||
NandHandle.Set_RCMode(true);
|
||||
else if(emulate_mode == 4)
|
||||
NandHandle.Set_FullMode(true);
|
||||
else
|
||||
NandHandle.Set_FullMode(false);
|
||||
if(NandHandle.Enable_Emu() < 0)
|
||||
if(emulate_mode)
|
||||
{
|
||||
NandHandle.Disable_Emu();
|
||||
error(_t("errgame6", L"Enabling emu after reload failed!"));
|
||||
Sys_Exit();
|
||||
/* Enable our Emu NAND */
|
||||
DeviceHandle.UnMountAll();
|
||||
if(emulate_mode == 3)
|
||||
NandHandle.Set_RCMode(true);
|
||||
else if(emulate_mode == 4)
|
||||
NandHandle.Set_FullMode(true);
|
||||
else
|
||||
NandHandle.Set_FullMode(false);
|
||||
if(NandHandle.Enable_Emu() < 0)
|
||||
{
|
||||
NandHandle.Disable_Emu();
|
||||
error(_t("errgame6", L"Enabling emu after reload failed!"));
|
||||
Sys_Exit();
|
||||
}
|
||||
DeviceHandle.MountAll();
|
||||
}
|
||||
DeviceHandle.MountAll();
|
||||
}
|
||||
bool wbfs_partition = false;
|
||||
if(!dvd)
|
||||
|
Loading…
Reference in New Issue
Block a user