mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-24 04:09:15 +01:00
-fixed theme reloading sometimes didnt work properly
-fixed return from plugins, homebrew or devolution killed wiiflows proper nand management -fixed devolution boot with ios249
This commit is contained in:
parent
9a1f56de1d
commit
f1b6ce3b8a
@ -20,6 +20,8 @@
|
||||
#include "cios.h"
|
||||
#include "fst.h"
|
||||
#include "channel/nand.hpp"
|
||||
#include "devicemounter/sdhc.h"
|
||||
#include "devicemounter/usbstorage.h"
|
||||
#include "homebrew/homebrew.h"
|
||||
|
||||
/* External WiiFlow Game Booter */
|
||||
@ -90,7 +92,13 @@ void WiiFlow_ExternalBooter(u8 vidMode, bool vipatch, bool countryString, u8 pat
|
||||
memcpy((void *)0x90000000, &normalCFG, sizeof(the_CFG));
|
||||
DCFlushRange((void *)(0x90000000), sizeof(the_CFG));
|
||||
|
||||
#ifndef DOLPHIN
|
||||
USBStorage2_Deinit();
|
||||
USB_Deinitialize();
|
||||
SDHC_Close();
|
||||
#endif
|
||||
Nand::Instance()->DeInit_ISFS(true); //cIOS loves magic :P
|
||||
|
||||
memcpy(EXECUTE_ADDR, wii_game_booter_dol, wii_game_booter_dol_size);
|
||||
DCFlushRange(EXECUTE_ADDR, wii_game_booter_dol_size);
|
||||
BootHomebrew();
|
||||
|
@ -75,16 +75,16 @@ int main(int argc, char **argv)
|
||||
DCFlushRange(&CurrentIOS, sizeof(IOS_Info));
|
||||
DeviceHandler::Instance()->SetModes();
|
||||
}
|
||||
else if(!AHBRPOT_Patched())
|
||||
{
|
||||
gprintf("Loading cIOS: %d\n", mainIOS);
|
||||
iosOK = loadIOS(mainIOS, false) && CustomIOS(CurrentIOS.Type);
|
||||
}
|
||||
else
|
||||
else if(AHBRPOT_Patched() && IOS_GetVersion() == 58)
|
||||
{
|
||||
gprintf("AHBPROT patched out, use IOS58\n");
|
||||
iosOK = loadIOS(58, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
gprintf("Loading cIOS: %d\n", mainIOS);
|
||||
iosOK = loadIOS(mainIOS, false) && CustomIOS(CurrentIOS.Type);
|
||||
}
|
||||
#else
|
||||
iosOK = true;
|
||||
#endif
|
||||
|
@ -885,8 +885,6 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
cleanup();
|
||||
|
||||
DeviceHandler::Instance()->UnMountAll();
|
||||
Nand::Instance()->DeInit_ISFS();
|
||||
|
||||
GC_SetVideoMode(videoMode, videoSetting);
|
||||
GC_SetLanguage(GClanguage);
|
||||
if(loader == 2)
|
||||
@ -895,14 +893,29 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
loadIOS(58, false);
|
||||
else //use cIOS instead to make sure Devolution works anyways
|
||||
loadIOS(mainIOS, false);
|
||||
writeStub();
|
||||
USBStorage2_Deinit();
|
||||
USB_Deinitialize();
|
||||
SDHC_Close();
|
||||
DEVO_SetOptions(path.c_str(), DeviceName[currentPartition], id.c_str(), memcard_emu);
|
||||
DEVO_Boot();
|
||||
}
|
||||
|
||||
#ifndef DOLPHIN
|
||||
USBStorage2_Deinit();
|
||||
USB_Deinitialize();
|
||||
SDHC_Close();
|
||||
#endif
|
||||
Nand::Instance()->DeInit_ISFS();
|
||||
if(loader == 2)
|
||||
{
|
||||
writeStub();
|
||||
DEVO_Boot();
|
||||
}
|
||||
else
|
||||
{
|
||||
DML_New_WriteOptions();
|
||||
WII_Initialize();
|
||||
if(WII_LaunchTitle(0x100000100LL) < 0)
|
||||
WII_LaunchTitle(0x100000100LL);
|
||||
}
|
||||
Sys_LoadMenu();
|
||||
}
|
||||
|
||||
@ -922,6 +935,12 @@ void CMenu::_launchHomebrew(const char *filepath, vector<string> arguments)
|
||||
for(u32 i = 0; i < arguments.size(); ++i)
|
||||
AddBootArgument(arguments[i].c_str());
|
||||
loadIOS(58, false);
|
||||
#ifndef DOLPHIN
|
||||
USBStorage2_Deinit();
|
||||
USB_Deinitialize();
|
||||
SDHC_Close();
|
||||
#endif
|
||||
Nand::Instance()->DeInit_ISFS();
|
||||
writeStub();
|
||||
BootHomebrew();
|
||||
}
|
||||
@ -1422,11 +1441,6 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
||||
return;
|
||||
}
|
||||
}
|
||||
#ifndef DOLPHIN
|
||||
USBStorage2_Deinit();
|
||||
USB_Deinitialize();
|
||||
SDHC_Close();
|
||||
#endif
|
||||
if(CurrentIOS.Type == IOS_TYPE_HERMES)
|
||||
{
|
||||
if(dvd)
|
||||
|
Loading…
Reference in New Issue
Block a user