mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-24 12:19:16 +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 "cios.h"
|
||||||
#include "fst.h"
|
#include "fst.h"
|
||||||
#include "channel/nand.hpp"
|
#include "channel/nand.hpp"
|
||||||
|
#include "devicemounter/sdhc.h"
|
||||||
|
#include "devicemounter/usbstorage.h"
|
||||||
#include "homebrew/homebrew.h"
|
#include "homebrew/homebrew.h"
|
||||||
|
|
||||||
/* External WiiFlow Game Booter */
|
/* 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));
|
memcpy((void *)0x90000000, &normalCFG, sizeof(the_CFG));
|
||||||
DCFlushRange((void *)(0x90000000), 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
|
Nand::Instance()->DeInit_ISFS(true); //cIOS loves magic :P
|
||||||
|
|
||||||
memcpy(EXECUTE_ADDR, wii_game_booter_dol, wii_game_booter_dol_size);
|
memcpy(EXECUTE_ADDR, wii_game_booter_dol, wii_game_booter_dol_size);
|
||||||
DCFlushRange(EXECUTE_ADDR, wii_game_booter_dol_size);
|
DCFlushRange(EXECUTE_ADDR, wii_game_booter_dol_size);
|
||||||
BootHomebrew();
|
BootHomebrew();
|
||||||
|
@ -75,16 +75,16 @@ int main(int argc, char **argv)
|
|||||||
DCFlushRange(&CurrentIOS, sizeof(IOS_Info));
|
DCFlushRange(&CurrentIOS, sizeof(IOS_Info));
|
||||||
DeviceHandler::Instance()->SetModes();
|
DeviceHandler::Instance()->SetModes();
|
||||||
}
|
}
|
||||||
else if(!AHBRPOT_Patched())
|
else if(AHBRPOT_Patched() && IOS_GetVersion() == 58)
|
||||||
{
|
|
||||||
gprintf("Loading cIOS: %d\n", mainIOS);
|
|
||||||
iosOK = loadIOS(mainIOS, false) && CustomIOS(CurrentIOS.Type);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
gprintf("AHBPROT patched out, use IOS58\n");
|
gprintf("AHBPROT patched out, use IOS58\n");
|
||||||
iosOK = loadIOS(58, false);
|
iosOK = loadIOS(58, false);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gprintf("Loading cIOS: %d\n", mainIOS);
|
||||||
|
iosOK = loadIOS(mainIOS, false) && CustomIOS(CurrentIOS.Type);
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
iosOK = true;
|
iosOK = true;
|
||||||
#endif
|
#endif
|
||||||
|
@ -885,8 +885,6 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
|||||||
cleanup();
|
cleanup();
|
||||||
|
|
||||||
DeviceHandler::Instance()->UnMountAll();
|
DeviceHandler::Instance()->UnMountAll();
|
||||||
Nand::Instance()->DeInit_ISFS();
|
|
||||||
|
|
||||||
GC_SetVideoMode(videoMode, videoSetting);
|
GC_SetVideoMode(videoMode, videoSetting);
|
||||||
GC_SetLanguage(GClanguage);
|
GC_SetLanguage(GClanguage);
|
||||||
if(loader == 2)
|
if(loader == 2)
|
||||||
@ -895,15 +893,30 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
|||||||
loadIOS(58, false);
|
loadIOS(58, false);
|
||||||
else //use cIOS instead to make sure Devolution works anyways
|
else //use cIOS instead to make sure Devolution works anyways
|
||||||
loadIOS(mainIOS, false);
|
loadIOS(mainIOS, false);
|
||||||
writeStub();
|
USBStorage2_Deinit();
|
||||||
|
USB_Deinitialize();
|
||||||
|
SDHC_Close();
|
||||||
DEVO_SetOptions(path.c_str(), DeviceName[currentPartition], id.c_str(), memcard_emu);
|
DEVO_SetOptions(path.c_str(), DeviceName[currentPartition], id.c_str(), memcard_emu);
|
||||||
DEVO_Boot();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DML_New_WriteOptions();
|
#ifndef DOLPHIN
|
||||||
WII_Initialize();
|
USBStorage2_Deinit();
|
||||||
if(WII_LaunchTitle(0x100000100LL) < 0)
|
USB_Deinitialize();
|
||||||
Sys_LoadMenu();
|
SDHC_Close();
|
||||||
|
#endif
|
||||||
|
Nand::Instance()->DeInit_ISFS();
|
||||||
|
if(loader == 2)
|
||||||
|
{
|
||||||
|
writeStub();
|
||||||
|
DEVO_Boot();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DML_New_WriteOptions();
|
||||||
|
WII_Initialize();
|
||||||
|
WII_LaunchTitle(0x100000100LL);
|
||||||
|
}
|
||||||
|
Sys_LoadMenu();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMenu::_launchHomebrew(const char *filepath, vector<string> arguments)
|
void CMenu::_launchHomebrew(const char *filepath, vector<string> arguments)
|
||||||
@ -922,6 +935,12 @@ void CMenu::_launchHomebrew(const char *filepath, vector<string> arguments)
|
|||||||
for(u32 i = 0; i < arguments.size(); ++i)
|
for(u32 i = 0; i < arguments.size(); ++i)
|
||||||
AddBootArgument(arguments[i].c_str());
|
AddBootArgument(arguments[i].c_str());
|
||||||
loadIOS(58, false);
|
loadIOS(58, false);
|
||||||
|
#ifndef DOLPHIN
|
||||||
|
USBStorage2_Deinit();
|
||||||
|
USB_Deinitialize();
|
||||||
|
SDHC_Close();
|
||||||
|
#endif
|
||||||
|
Nand::Instance()->DeInit_ISFS();
|
||||||
writeStub();
|
writeStub();
|
||||||
BootHomebrew();
|
BootHomebrew();
|
||||||
}
|
}
|
||||||
@ -1422,11 +1441,6 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef DOLPHIN
|
|
||||||
USBStorage2_Deinit();
|
|
||||||
USB_Deinitialize();
|
|
||||||
SDHC_Close();
|
|
||||||
#endif
|
|
||||||
if(CurrentIOS.Type == IOS_TYPE_HERMES)
|
if(CurrentIOS.Type == IOS_TYPE_HERMES)
|
||||||
{
|
{
|
||||||
if(dvd)
|
if(dvd)
|
||||||
|
Loading…
Reference in New Issue
Block a user