mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-11-01 00:55:06 +01:00
- minor changes.
This commit is contained in:
parent
ef1f601e9b
commit
20a307e175
Binary file not shown.
BIN
out/boot.dol
BIN
out/boot.dol
Binary file not shown.
Before Width: | Height: | Size: 4.4 MiB After Width: | Height: | Size: 4.4 MiB |
@ -96,7 +96,7 @@ void WiiFlow_ExternalBooter(u8 vidMode, bool vipatch, bool countryString, u8 pat
|
||||
DCFlushRange(&lowCFG, sizeof(the_CFG));
|
||||
*EXT_ADDR_CFG = ((u32)lowCFG);
|
||||
/* Unmount devices etc */
|
||||
ShutdownBeforeExit();
|
||||
ShutdownBeforeExit();// before launching wii game or channel via external booter
|
||||
/* Set proper time */
|
||||
settime(secs_to_ticks(time(NULL) - 946684800));
|
||||
/* Copy in booter */
|
||||
|
@ -1,6 +1,6 @@
|
||||
|
||||
#define APP_NAME "WiiFlow WFL"
|
||||
#define APP_VERSION "5.5.3 beta 1"
|
||||
#define APP_VERSION "5.5.3 beta 2"
|
||||
|
||||
#define APP_DATA_DIR "wiiflow"
|
||||
#define APPS_DIR "apps/wiiflow"
|
||||
|
@ -1190,7 +1190,6 @@ private:
|
||||
vector<string> _getMetaXML(const char *bootpath);
|
||||
void _extractBnr(const dir_discHdr *hdr);
|
||||
void _setCurrentItem(const dir_discHdr *hdr);
|
||||
void _exitWiiflow();
|
||||
void exitHandler(int ExitTo);
|
||||
void _setAA(int aa);
|
||||
void _loadCFCfg();
|
||||
|
@ -1644,6 +1644,7 @@ int CMenu::_coverDownloader()
|
||||
int CMenu::_gametdbDownloaderAsync()
|
||||
{
|
||||
const string &langCode = m_loc.getString(m_curLanguage, "gametdb_code", "EN");
|
||||
string gametdb_url = m_cfg.getString("GENERAL", "gametdb_url", GAMETDB_URL);
|
||||
m_thrdTotal = 3; // Download, save and unzip
|
||||
|
||||
m_thrdMessage = _t("dlmsg1", L"Initializing network...");
|
||||
@ -1657,7 +1658,7 @@ int CMenu::_gametdbDownloaderAsync()
|
||||
m_thrdMessage = _t("dlmsg11", L"Downloading...");
|
||||
m_thrdMessageAdded = true;
|
||||
struct download file = {};
|
||||
downloadfile(fmt(GAMETDB_URL, langCode.c_str()), &file);
|
||||
downloadfile(fmt(gametdb_url.c_str(), langCode.c_str()), &file);
|
||||
if(errno == ENOMEM)
|
||||
return -1;
|
||||
else if(file.size <= 0)
|
||||
|
@ -185,6 +185,11 @@ void CMenu::_launch(const dir_discHdr *hdr)
|
||||
_launchHomebrew(bootpath, arguments);
|
||||
}
|
||||
}
|
||||
// if we make it here it means the launch failed.
|
||||
//Exit WiiFlow, no game booted...
|
||||
cleanup();// cleanup and clear memory
|
||||
ShutdownBeforeExit();// unmount devices and close inputs. launch game failed.
|
||||
Sys_Exit();
|
||||
}
|
||||
|
||||
void CMenu::_launchPlugin(dir_discHdr *hdr)
|
||||
@ -275,7 +280,7 @@ void CMenu::_launchHomebrew(const char *filepath, vector<string> arguments)
|
||||
if(ret == false)
|
||||
{
|
||||
error(_t("errgame14", L"app_booter.bin not found!"));
|
||||
_exitWiiflow();
|
||||
return;
|
||||
}
|
||||
/* no more error msgs - remove btns and sounds */
|
||||
cleanup();
|
||||
@ -287,7 +292,7 @@ void CMenu::_launchHomebrew(const char *filepath, vector<string> arguments)
|
||||
AddBootArgument(arguments[i].c_str());
|
||||
}
|
||||
|
||||
ShutdownBeforeExit();// wifi and sd gecko doesnt work anymore after
|
||||
ShutdownBeforeExit();// before launching homebrew or plugin dol
|
||||
NandHandle.Patch_AHB();
|
||||
IOS_ReloadIOS(58);
|
||||
BootHomebrew();
|
||||
@ -519,7 +524,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
if(ret == false)
|
||||
{
|
||||
error(_t("errgame14", L"app_booter.bin not found!"));
|
||||
_exitWiiflow();
|
||||
return;
|
||||
}
|
||||
|
||||
/* no more error msgs - remove btns and sounds */
|
||||
@ -655,7 +660,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
}
|
||||
|
||||
Nintendont_SetOptions(path, id, CheatPath, GClanguage, n_config, n_videomode, vidscale, vidoffset, netprofile);
|
||||
ShutdownBeforeExit();
|
||||
ShutdownBeforeExit();// before launching nintendont
|
||||
NandHandle.Patch_AHB();
|
||||
IOS_ReloadIOS(58);
|
||||
BootHomebrew(); //regular dol
|
||||
@ -687,7 +692,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool disc)
|
||||
|
||||
DEVO_GetLoader(m_dataDir.c_str());
|
||||
DEVO_SetOptions(path, id, videoMode, GClanguage, memcard_emu, widescreen, activity_led, m_use_wifi_gecko);
|
||||
ShutdownBeforeExit();
|
||||
ShutdownBeforeExit();// before launching devolution
|
||||
NandHandle.Patch_AHB();
|
||||
IOS_ReloadIOS(58);
|
||||
DEVO_Boot();
|
||||
@ -780,7 +785,7 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
|
||||
m_cat.save(true);
|
||||
m_cfg.save(true);
|
||||
cleanup();//no more error messages we can now cleanup
|
||||
ShutdownBeforeExit();
|
||||
ShutdownBeforeExit();// before wii_launch channel
|
||||
WII_Initialize();
|
||||
WII_LaunchTitle(gameTitle);
|
||||
}
|
||||
@ -877,7 +882,7 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
|
||||
if(!Load_Neek2o_Kernel())
|
||||
{
|
||||
error(_t("errneek1", L"Cannot launch neek2o. Verify your neek2o setup"));//kernal.bin not found
|
||||
_exitWiiflow();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -888,7 +893,7 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
|
||||
nkrtrn = "NK2O";
|
||||
u32 nkreturnTo = nkrtrn[0] << 24 | nkrtrn[1] << 16 | nkrtrn[2] << 8 | nkrtrn[3];
|
||||
cleanup();
|
||||
ShutdownBeforeExit();
|
||||
ShutdownBeforeExit();// before using neek2o to launch a channel
|
||||
if(IsOnWiiU())
|
||||
Launch_nk(gameTitle, NandHandle.Get_NandPath(), ((u64)(0x00010002) << 32) | (nkreturnTo & 0xFFFFFFFF));
|
||||
else
|
||||
@ -902,14 +907,14 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
|
||||
if(ExternalBooter_LoadBins(m_binsDir.c_str()) == false)
|
||||
{
|
||||
error(_t("errgame15", L"Missing ext_loader.bin or ext_booter.bin!"));
|
||||
_exitWiiflow();
|
||||
return;
|
||||
}
|
||||
|
||||
/* load selected cIOS if necessary */
|
||||
if(_loadGameIOS(gameIOS, userIOS, id, !NANDemuView) == LOAD_IOS_FAILED)
|
||||
{
|
||||
/* error message already shown */
|
||||
_exitWiiflow();
|
||||
return;
|
||||
}
|
||||
|
||||
/* if d2x cios patch returnto */
|
||||
@ -936,7 +941,7 @@ void CMenu::_launchChannel(dir_discHdr *hdr)
|
||||
{
|
||||
NandHandle.Disable_Emu();
|
||||
error(_t("errgame5", L"Enabling emu failed!"));
|
||||
_exitWiiflow();
|
||||
return;
|
||||
}
|
||||
DeviceHandle.MountAll();
|
||||
}
|
||||
@ -1202,7 +1207,7 @@ void CMenu::_launchWii(dir_discHdr *hdr, bool dvd, bool disc_cfg)
|
||||
if(ExternalBooter_LoadBins(m_binsDir.c_str()) == false)
|
||||
{
|
||||
error(_t("errgame15", L"Missing ext_loader.bin or ext_booter.bin!"));
|
||||
_exitWiiflow();
|
||||
return;
|
||||
}
|
||||
|
||||
/* load selected cIOS if necessary */
|
||||
@ -1211,7 +1216,7 @@ void CMenu::_launchWii(dir_discHdr *hdr, bool dvd, bool disc_cfg)
|
||||
if(_loadGameIOS(gameIOS, userIOS, id) == LOAD_IOS_FAILED)
|
||||
{
|
||||
/* error message already shown */
|
||||
_exitWiiflow();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1284,11 +1289,3 @@ void CMenu::_launchWii(dir_discHdr *hdr, bool dvd, bool disc_cfg)
|
||||
|
||||
Sys_Exit();
|
||||
}
|
||||
|
||||
void CMenu::_exitWiiflow()
|
||||
{
|
||||
//Exit WiiFlow, no game booted...
|
||||
cleanup();// cleanup and clear memory
|
||||
ShutdownBeforeExit();// unmount devices and close inputs
|
||||
Sys_Exit();
|
||||
}
|
||||
|
@ -153,6 +153,11 @@ bool CMenu::_Home(void)
|
||||
}
|
||||
else if(BTN_HOME_PRESSED)
|
||||
{
|
||||
if(BTN_B_HELD)// reboot wiiflow if B button held and HOME button pressed.
|
||||
{
|
||||
m_reload = true;
|
||||
return true;
|
||||
}
|
||||
if(isWiiVC)
|
||||
{
|
||||
exitHandler(EXIT_TO_MENU);
|
||||
|
@ -464,16 +464,8 @@ int CMenu::main(void)
|
||||
}
|
||||
if(BTN_HOME_PRESSED || (BTN_A_PRESSED && m_btnMgr.selected(m_mainBtnHome)))
|
||||
{
|
||||
if(m_sourceflow)//back to base tier or exit sourceflow
|
||||
if(m_sourceflow)// open Source Menu Editor Menu
|
||||
{
|
||||
/*if(!_srcTierBack(true))// if already on base tier exit sourceflow
|
||||
{
|
||||
_restoreSrcTiers();
|
||||
m_sourceflow = false;
|
||||
}
|
||||
_getCustomBgTex();
|
||||
_setMainBg();
|
||||
_showCF(true);//refresh coverflow or sourceflow list*/
|
||||
_hideMain();
|
||||
_SM_Editor();
|
||||
if(BTN_B_HELD)
|
||||
@ -484,19 +476,18 @@ int CMenu::main(void)
|
||||
_setMainBg();
|
||||
_showCF(true);
|
||||
}
|
||||
else
|
||||
else // open Home Menu
|
||||
{
|
||||
_hideMain();
|
||||
/* Home menu */
|
||||
if(_Home())
|
||||
break;// exit wiiflow
|
||||
break;// if exit or shutdown option was selected then exit wiiflow
|
||||
if(prevTheme != m_themeName)
|
||||
{
|
||||
/* new theme - exit wiiflow and reload */
|
||||
fsop_deleteFolder(fmt("%s/sourceflow", m_cacheDir.c_str()));
|
||||
m_cfg.remove(SOURCEFLOW_DOMAIN, "numbers");
|
||||
m_cfg.remove(SOURCEFLOW_DOMAIN, "tiers");
|
||||
m_reload = true;
|
||||
m_reload = true;// reload for new theme
|
||||
break;
|
||||
}
|
||||
if(BTN_B_HELD)
|
||||
@ -558,7 +549,7 @@ int CMenu::main(void)
|
||||
fsop_deleteFolder(fmt("%s/sourceflow", m_cacheDir.c_str()));
|
||||
m_cfg.remove(SOURCEFLOW_DOMAIN, "numbers");
|
||||
m_cfg.remove(SOURCEFLOW_DOMAIN, "tiers");
|
||||
m_reload = true;
|
||||
m_reload = true;// reload for new theme
|
||||
break;
|
||||
}
|
||||
if(BTN_B_HELD)
|
||||
@ -969,8 +960,7 @@ int CMenu::main(void)
|
||||
CoverFlow.mouse(chan, -1, -1);
|
||||
}
|
||||
}
|
||||
ScanInput();
|
||||
if(m_reload || BTN_B_HELD)// rebooting wiiflow
|
||||
if(m_reload)// rebooting wiiflow (forced in Home Menu or new theme)
|
||||
{
|
||||
vector<string> arguments = _getMetaXML(fmt("%s/boot.dol", m_appDir.c_str()));
|
||||
_launchHomebrew(fmt("%s/boot.dol", m_appDir.c_str()), arguments);
|
||||
|
Loading…
Reference in New Issue
Block a user