diff --git a/data/stub.bin b/data/stub.bin deleted file mode 100644 index 917e1c7e..00000000 Binary files a/data/stub.bin and /dev/null differ diff --git a/out/boot.dol b/out/boot.dol index 1d445fb6..202889a3 100644 Binary files a/out/boot.dol and b/out/boot.dol differ diff --git a/source/homebrew/homebrew.cpp b/source/homebrew/homebrew.cpp index d28a9f08..67a33ae3 100644 --- a/source/homebrew/homebrew.cpp +++ b/source/homebrew/homebrew.cpp @@ -32,8 +32,6 @@ using std::vector; extern const u8 wfstub_bin[]; extern const u32 wfstub_bin_size; -extern const u8 stub_bin[]; -extern const u32 stub_bin_size; u8 valid = 0; diff --git a/source/main.cpp b/source/main.cpp index 5acd31ad..0f1ae231 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -92,7 +92,6 @@ int main(int argc, char **argv) gprintf(" \nWelcome to %s %s!\nThis is the debug output.\n", APP_NAME, APP_VERSION); #endif - bool iosOK = true; char *gameid = NULL; bool showFlashImg = true; bool wait_loop = false; @@ -176,10 +175,10 @@ int main(int argc, char **argv) { NandHandle.DeInit_ISFS(); NandHandle.Patch_AHB(); - iosOK = IOS_ReloadIOS(mainIOS) == 0; + IOS_ReloadIOS(mainIOS); NandHandle.Init_ISFS(); gprintf("AHBPROT disabled after IOS Reload: %s\n", AHBPROT_Patched() ? "yes" : "no"); - gprintf("Now using "); + gprintf("Now using ");// gprintf finished in IOS_GetCurrentIOSInfo() } else gprintf("Using IOS58\n");// stay on IOS58. no reload to cIOS @@ -214,27 +213,17 @@ int main(int argc, char **argv) /* init configs, folders, coverflow, gui and more */ if(mainMenu.init(usb_mounted)) { - if(!iosOK) - mainMenu.terror("errboot1", L"No cIOS found!\ncIOS d2x 249 base 56 and 250 base 57 are enough for all your games."); - else if(!DeviceHandle.UsablePartitionMounted()) - mainMenu.terror("errboot2", L"Could not find a device to save configuration files on!"); - else if(WDVD_Init() < 0) - mainMenu.terror("errboot3", L"Could not initialize the DIP module!"); - else // alls good lets start wiiflow - { - startup_successful = true; - if(!isWiiVC) - writeStub();// copy return stub to memory - if(gameid != NULL && strlen(gameid) == 6)// if argv game ID then launch it - mainMenu.directlaunch(gameid); - else - mainMenu.main();// start wiiflow with main menu displayed - } - //Exit WiiFlow, no game booted... - mainMenu.cleanup();// removes all sounds, fonts, images, coverflow, plugin stuff, source menu and clear memory + startup_successful = true; + if(!isWiiVC) + writeStub();// copy return stub to memory + if(!isWiiVC && gameid != NULL && strlen(gameid) == 6)// if argv game ID then launch it + mainMenu.directlaunch(gameid); + else + mainMenu.main();// start wiiflow with main menu displayed } + // at this point either wiiflow bootup failed or the user is exiting wiiflow ShutdownBeforeExit();// unmount devices and close inputs - if(startup_successful)// use wiiflow's exit choice otherwise just exit to loader (system menu or hbc) + if(startup_successful)// use wiiflow's exit choice Sys_Exit(); - return 0; + return 0;// otherwise just exit to loader (system menu or hbc). } diff --git a/source/menu/menu_game_boot.cpp b/source/menu/menu_game_boot.cpp index f3e952e1..85154b1b 100644 --- a/source/menu/menu_game_boot.cpp +++ b/source/menu/menu_game_boot.cpp @@ -75,10 +75,9 @@ static u8 GetRequestedGameIOS(dir_discHdr *hdr) void CMenu::directlaunch(const char *GameID)// from boot arg for wii game only { m_directLaunch = true; - for(currentPartition = SD; currentPartition < USB8; currentPartition++) + currentPartition = m_cfg.getInt(WII_DOMAIN, "partition"); + if(DeviceHandle.IsInserted(currentPartition)) { - if(!DeviceHandle.IsInserted(currentPartition)) - continue; DeviceHandle.OpenWBFS(currentPartition); string gameDir(fmt(wii_games_dir, DeviceName[currentPartition])); string cacheDir(fmt("%s/%s_wii.db", m_listCacheDir.c_str(), DeviceName[currentPartition]));