From 09638f273a94af1a3a71ce37e232524510bb94a2 Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Sat, 15 Dec 2012 13:06:33 +0000 Subject: [PATCH] -changed version number to Beta 4.0.6 -fixed shutdown in vwii mode -fixed return to in vwii mode --- source/defines.h | 2 +- source/loader/sys.c | 16 +++++----------- source/loader/sys.h | 1 - source/menu/menu_game.cpp | 4 ++-- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/source/defines.h b/source/defines.h index 4f6245bf..2081b38b 100644 --- a/source/defines.h +++ b/source/defines.h @@ -1,5 +1,5 @@ #define APP_NAME "WiiFlow" -#define APP_VERSION "Beta 4.0.5" +#define APP_VERSION "Beta 4.0.6" #define APPDATA_DIR "wiiflow" #define APPDATA_DIR2 "apps/wiiflow" diff --git a/source/loader/sys.c b/source/loader/sys.c index 1d89b5c2..3eb19b1c 100644 --- a/source/loader/sys.c +++ b/source/loader/sys.c @@ -60,15 +60,6 @@ bool Sys_Exiting(void) return reset || shutdown; } -void Sys_Shutdown(void) -{ - /* via hollywood registers first */ - *HW_GPIO_OUT |= (1<<1); - usleep(50000); - /* If it failed just do the libogc way */ - SYS_ResetSystem(SYS_SHUTDOWN, 0, 0); -} - int Sys_GetExitTo(void) { return ExitOption; @@ -103,6 +94,11 @@ void Sys_Exit(void) /* Shutdown Inputs */ Close_Inputs(); + /* Just shutdown console*/ + if(ExitOption == BUTTON_CALLBACK) + SYS_ResetSystem(SYS_POWEROFF_STANDBY, 0, 0); + + /* We wanna to boot sth */ WII_Initialize(); if(ExitOption == EXIT_TO_WFNK2O) Launch_nk(0x1000144574641LL, NeekPath, 0); @@ -117,8 +113,6 @@ void Sys_Exit(void) WII_LaunchTitle(HBC_JODI); WII_LaunchTitle(HBC_HAXX); } - else if(ExitOption == BUTTON_CALLBACK) - Sys_Shutdown(); /* else Return to Menu */ SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0); exit(1); diff --git a/source/loader/sys.h b/source/loader/sys.h index bfbf93d7..d44fbc3c 100644 --- a/source/loader/sys.h +++ b/source/loader/sys.h @@ -31,7 +31,6 @@ enum /* Prototypes */ void Sys_Init(void); -void Sys_Shutdown(void); bool Sys_DolphinMode(void); bool Sys_Exiting(void); void Sys_Exit(void); diff --git a/source/menu/menu_game.cpp b/source/menu/menu_game.cpp index e3f73b89..f8b0d722 100644 --- a/source/menu/menu_game.cpp +++ b/source/menu/menu_game.cpp @@ -1219,7 +1219,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd) int language = min((u32)m_gcfg2.getInt(id, "language", 0), ARRAY_SIZE(CMenu::_languages) - 1u); language = (language == 0) ? min((u32)m_cfg.getInt("GENERAL", "game_language", 0), ARRAY_SIZE(CMenu::_languages) - 1) : language; - const char *rtrn = m_gcfg2.getBool(id, "returnto", true) ? m_cfg.getString("GENERAL", "returnto").c_str() : NULL; + const char *rtrn = m_cfg.getString("GENERAL", "returnto", "").c_str(); int aspectRatio = min((u32)m_gcfg2.getInt(id, "aspect_ratio", 0), ARRAY_SIZE(CMenu::_AspectRatio) - 1u)-1; string emuPath; @@ -1315,7 +1315,7 @@ void CMenu::_launchGame(dir_discHdr *hdr, bool dvd) if(!debuggerselect && cheatFile == NULL) hooktype = 0; - if(rtrn != NULL && strlen(rtrn) == 4) + if(strlen(rtrn) == 4) returnTo = rtrn[0] << 24 | rtrn[1] << 16 | rtrn[2] << 8 | rtrn[3]; int userIOS = m_gcfg2.getInt(id, "ios", 0); int gameIOS = dvd && !neek2o() ? userIOS : GetRequestedGameIOS(hdr);