mirror of
https://github.com/Fledge68/WiiFlow_Lite.git
synced 2024-12-25 19:31:58 +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();
|
||||
}
|
||||
for(u8 i = 0; i < m_defaultWaitMessages.size(); i++)
|
||||
{
|
||||
if(m_defaultWaitMessages[i].data.get())
|
||||
m_defaultWaitMessages[i].data.release();
|
||||
}
|
||||
if(m_frameBuf[0] != NULL)
|
||||
{
|
||||
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;
|
||||
}
|
||||
m_defaultWaitMessages[i].data.release();
|
||||
free(MEM_K1_TO_K0(m_frameBuf[0]));
|
||||
free(MEM_K1_TO_K0(m_frameBuf[1]));
|
||||
MEM1_free(m_stencil);
|
||||
MEM1_free(m_fifo);
|
||||
}
|
||||
|
||||
void CVideo::prepareAAPass(int aaStep)
|
||||
|
@ -136,14 +136,10 @@ int main(int argc, char **argv)
|
||||
ret = menu.main();
|
||||
}
|
||||
}
|
||||
Open_Inputs(); //reinit wiimote
|
||||
if(ret == 1)
|
||||
Open_Inputs(); //reinit wiimote
|
||||
} while (ret == 1);
|
||||
|
||||
WifiGecko_Close();
|
||||
|
||||
Nand::Instance()->Disable_Emu();
|
||||
Nand::DestroyInstance();
|
||||
|
||||
Sys_Exit();
|
||||
return 0;
|
||||
};
|
||||
|
@ -462,8 +462,13 @@ void CMenu::init(void)
|
||||
}
|
||||
}
|
||||
|
||||
bool cleaned_up = false;
|
||||
|
||||
void CMenu::cleanup(bool ios_reload)
|
||||
{
|
||||
if(cleaned_up)
|
||||
return;
|
||||
|
||||
m_cf.stopCoverLoader();
|
||||
m_cf.clear();
|
||||
ClearGameSoundThreadStack();
|
||||
@ -500,6 +505,7 @@ void CMenu::cleanup(bool ios_reload)
|
||||
_deinitNetwork();
|
||||
ClearLogBuffer();
|
||||
|
||||
cleaned_up = true;
|
||||
gprintf(" \nMemory cleaned up\n");
|
||||
}
|
||||
|
||||
|
@ -790,14 +790,6 @@ int CMenu::main(void)
|
||||
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");
|
||||
m_cfg.save();
|
||||
m_cat.save();
|
||||
@ -807,8 +799,7 @@ int CMenu::main(void)
|
||||
coverStatus = LWP_THREAD_NULL;
|
||||
if(coverstatus_stack.get())
|
||||
coverstatus_stack.release();
|
||||
|
||||
gprintf("Done with main\n");
|
||||
cleanup();
|
||||
return m_reload ? 1 : 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user