-fixed codedump on wiiflow exit for some people

This commit is contained in:
fix94.1 2012-07-07 13:42:21 +00:00
parent 46e807cb91
commit 990479f308
2 changed files with 28 additions and 35 deletions

View File

@ -2,8 +2,6 @@
#include "menu.hpp" #include "menu.hpp"
#include "svnrev.h" #include "svnrev.h"
#define SET_EXIT(X) exitHandler(X); exit = true; break;
u32 m_homeLblTitle; u32 m_homeLblTitle;
u32 m_exittoLblTitle; u32 m_exittoLblTitle;
@ -22,8 +20,6 @@ STexture m_homeBg;
bool CMenu::_Home(void) bool CMenu::_Home(void)
{ {
bool exit = false;
SetupInput(); SetupInput();
_showHome(); _showHome();
@ -39,7 +35,7 @@ bool CMenu::_Home(void)
_config(1); _config(1);
if(prevTheme != m_cfg.getString("GENERAL", "theme") || m_reload == true) if(prevTheme != m_cfg.getString("GENERAL", "theme") || m_reload == true)
{ {
exit = true; m_exit = true;
m_reload = true; m_reload = true;
break; break;
} }
@ -76,34 +72,32 @@ bool CMenu::_Home(void)
} }
else if(m_btnMgr.selected(m_homeBtnExitTo)) else if(m_btnMgr.selected(m_homeBtnExitTo))
{ {
_hideHome();
if(m_locked) if(m_locked)
{ exitHandler(0);
SET_EXIT(0);
}
else else
exit = _ExitTo(); _ExitTo();
if(m_exit)
break; break;
_showHome();
} }
} }
else if(BTN_HOME_PRESSED) else if(BTN_HOME_PRESSED)
{ {
SET_EXIT(0); exitHandler(0);
break;
} }
else if(BTN_B_PRESSED) else if(BTN_B_PRESSED)
break; break;
} }
_hideHome(); _hideHome();
return exit; return m_exit;
} }
bool CMenu::_ExitTo(void) bool CMenu::_ExitTo(void)
{ {
bool exit = false;
SetupInput(); SetupInput();
_hideHome();
_showExitTo(); _showExitTo();
while(1) while(1)
@ -113,35 +107,35 @@ bool CMenu::_ExitTo(void)
{ {
if(m_btnMgr.selected(m_homeBtnExitToHBC)) if(m_btnMgr.selected(m_homeBtnExitToHBC))
{ {
SET_EXIT(1); exitHandler(1);
break;
} }
else if(m_btnMgr.selected(m_homeBtnExitToMenu)) else if(m_btnMgr.selected(m_homeBtnExitToMenu))
{ {
SET_EXIT(2); exitHandler(2);
break;
} }
else if(m_btnMgr.selected(m_homeBtnExitToPriiloader)) else if(m_btnMgr.selected(m_homeBtnExitToPriiloader))
{ {
SET_EXIT(3); exitHandler(3);
break;
} }
else if(m_btnMgr.selected(m_homeBtnExitToBootmii)) else if(m_btnMgr.selected(m_homeBtnExitToBootmii))
{ {
SET_EXIT(4); exitHandler(4);
}
}
else if(BTN_B_PRESSED)
{
_hideExitTo();
exit = _Home();
break; break;
} }
}
else if(BTN_HOME_PRESSED) else if(BTN_HOME_PRESSED)
{ {
SET_EXIT(0); exitHandler(0);
break;
} }
else if(BTN_B_PRESSED)
break;
} }
_hideExitTo(); _hideExitTo();
return exit; return m_exit;
} }
void CMenu::_showHome(void) void CMenu::_showHome(void)

View File

@ -216,10 +216,9 @@ void CMenu::LoadView(void)
void CMenu::exitHandler(int ExitTo) void CMenu::exitHandler(int ExitTo)
{ {
gprintf("Exit WiiFlow called\n"); gprintf("Exit WiiFlow called\n");
bool exitSet = false;
if(!m_locked && !m_disable_exit) if(!m_locked && !m_disable_exit)
{ {
exitSet = true; m_exit = true;
if(ExitTo == 1) // HBC if(ExitTo == 1) // HBC
Sys_ExitTo(EXIT_TO_HBC); Sys_ExitTo(EXIT_TO_HBC);
else if(ExitTo == 2) // System Menu else if(ExitTo == 2) // System Menu
@ -241,7 +240,7 @@ void CMenu::exitHandler(int ExitTo)
} }
m_reload = (BTN_B_HELD || m_disable_exit); m_reload = (BTN_B_HELD || m_disable_exit);
if(!exitSet && !m_reload) if(m_exit && !m_reload) //D'oh!
{ {
// Mark exiting to prevent soundhandler from restarting // Mark exiting to prevent soundhandler from restarting
extern bool exiting; extern bool exiting;