mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-25 11:21:55 +01:00
-return to system menu should be a bit more safe now :P
This commit is contained in:
parent
bd40c72b13
commit
bcf1fd48f1
@ -249,30 +249,11 @@ void CVideo::cleanup(void)
|
|||||||
m_aaBuffer[i].release();
|
m_aaBuffer[i].release();
|
||||||
}
|
}
|
||||||
for(u8 i = 0; i < m_defaultWaitMessages.size(); i++)
|
for(u8 i = 0; i < m_defaultWaitMessages.size(); i++)
|
||||||
{
|
m_defaultWaitMessages[i].data.release();
|
||||||
if(m_defaultWaitMessages[i].data.get())
|
free(MEM_K1_TO_K0(m_frameBuf[0]));
|
||||||
m_defaultWaitMessages[i].data.release();
|
free(MEM_K1_TO_K0(m_frameBuf[1]));
|
||||||
}
|
MEM1_free(m_stencil);
|
||||||
if(m_frameBuf[0] != NULL)
|
MEM1_free(m_fifo);
|
||||||
{
|
|
||||||
free(MEM_K1_TO_K0(m_frameBuf[0]));
|
|
||||||
m_frameBuf[0] = NULL;
|
|
||||||
}
|
|
||||||
if(m_frameBuf[1] != NULL)
|
|
||||||
{
|
|
||||||
free(MEM_K1_TO_K0(m_frameBuf[1]));
|
|
||||||
m_frameBuf[0] = NULL;
|
|
||||||
}
|
|
||||||
if(m_stencil != NULL)
|
|
||||||
{
|
|
||||||
MEM1_free(m_stencil);
|
|
||||||
m_stencil = NULL;
|
|
||||||
}
|
|
||||||
if(m_fifo != NULL)
|
|
||||||
{
|
|
||||||
MEM1_free(m_fifo);
|
|
||||||
m_fifo = NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CVideo::prepareAAPass(int aaStep)
|
void CVideo::prepareAAPass(int aaStep)
|
||||||
|
@ -136,13 +136,9 @@ int main(int argc, char **argv)
|
|||||||
ret = menu.main();
|
ret = menu.main();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Open_Inputs(); //reinit wiimote
|
if(ret == 1)
|
||||||
|
Open_Inputs(); //reinit wiimote
|
||||||
} while (ret == 1);
|
} while (ret == 1);
|
||||||
|
|
||||||
WifiGecko_Close();
|
|
||||||
|
|
||||||
Nand::Instance()->Disable_Emu();
|
|
||||||
Nand::DestroyInstance();
|
|
||||||
|
|
||||||
Sys_Exit();
|
Sys_Exit();
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -462,8 +462,13 @@ void CMenu::init(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool cleaned_up = false;
|
||||||
|
|
||||||
void CMenu::cleanup(bool ios_reload)
|
void CMenu::cleanup(bool ios_reload)
|
||||||
{
|
{
|
||||||
|
if(cleaned_up)
|
||||||
|
return;
|
||||||
|
|
||||||
m_cf.stopCoverLoader();
|
m_cf.stopCoverLoader();
|
||||||
m_cf.clear();
|
m_cf.clear();
|
||||||
ClearGameSoundThreadStack();
|
ClearGameSoundThreadStack();
|
||||||
@ -500,6 +505,7 @@ void CMenu::cleanup(bool ios_reload)
|
|||||||
_deinitNetwork();
|
_deinitNetwork();
|
||||||
ClearLogBuffer();
|
ClearLogBuffer();
|
||||||
|
|
||||||
|
cleaned_up = true;
|
||||||
gprintf(" \nMemory cleaned up\n");
|
gprintf(" \nMemory cleaned up\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -790,14 +790,6 @@ int CMenu::main(void)
|
|||||||
m_cf.mouse(m_vid, chan, -1, -1);
|
m_cf.mouse(m_vid, chan, -1, -1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_showWaitMessage();
|
|
||||||
|
|
||||||
gprintf("Invalidate GX\n");
|
|
||||||
|
|
||||||
GX_InvVtxCache();
|
|
||||||
GX_InvalidateTexAll();
|
|
||||||
gprintf("Clear coverflow\n");
|
|
||||||
m_cf.clear();
|
|
||||||
gprintf("Saving configuration files\n");
|
gprintf("Saving configuration files\n");
|
||||||
m_cfg.save();
|
m_cfg.save();
|
||||||
m_cat.save();
|
m_cat.save();
|
||||||
@ -807,8 +799,7 @@ int CMenu::main(void)
|
|||||||
coverStatus = LWP_THREAD_NULL;
|
coverStatus = LWP_THREAD_NULL;
|
||||||
if(coverstatus_stack.get())
|
if(coverstatus_stack.get())
|
||||||
coverstatus_stack.release();
|
coverstatus_stack.release();
|
||||||
|
cleanup();
|
||||||
gprintf("Done with main\n");
|
|
||||||
return m_reload ? 1 : 0;
|
return m_reload ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user