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

View File

@ -216,10 +216,9 @@ void CMenu::LoadView(void)
void CMenu::exitHandler(int ExitTo)
{
gprintf("Exit WiiFlow called\n");
bool exitSet = false;
if(!m_locked && !m_disable_exit)
{
exitSet = true;
m_exit = true;
if(ExitTo == 1) // HBC
Sys_ExitTo(EXIT_TO_HBC);
else if(ExitTo == 2) // System Menu
@ -241,7 +240,7 @@ void CMenu::exitHandler(int ExitTo)
}
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
extern bool exiting;