-fixed broken return to system menu (thanks libogc for such

a huge failcommand)
This commit is contained in:
fix94.1 2012-05-06 16:32:07 +00:00
parent 70955117f9
commit 867ab43530
3 changed files with 18 additions and 12 deletions

View File

@ -228,11 +228,13 @@ void CVideo::prepare(void)
void CVideo::cleanup(void) void CVideo::cleanup(void)
{ {
gprintf("Cleaning up video...\n");
for (u32 i = 0; i < sizeof m_aaBuffer / sizeof m_aaBuffer[0]; ++i) for (u32 i = 0; i < sizeof m_aaBuffer / sizeof m_aaBuffer[0]; ++i)
{ {
SMART_FREE(m_aaBuffer[i]); SMART_FREE(m_aaBuffer[i]);
m_aaBufferSize[i] = 0; m_aaBufferSize[i] = 0;
} }
SAFE_FREE(m_fifo);
} }
void CVideo::prepareAAPass(int aaStep) void CVideo::prepareAAPass(int aaStep)

View File

@ -82,16 +82,17 @@ void Sys_ExitTo(int option)
//magic word to force wii menu in priiloader. //magic word to force wii menu in priiloader.
if(return_to_menu) if(return_to_menu)
{ {
Write32(0x8132fffb, 0x50756e65); *(vu32*)0x8132FFFB = 0x50756e65;
} }
else if(return_to_priiloader) else if(return_to_priiloader)
{ {
Write32(0x8132fffb,0x4461636f); *(vu32*)0x8132FFFB = 0x4461636f;
} }
else else
{ {
Write32(0x8132fffb,0xffffffff); *(vu32*)0x8132FFFB = 0xffffffff;
} }
DCFlushRange((void *)(0x8132FFFB), 4);
} }
void Sys_Exit(void) void Sys_Exit(void)
@ -101,12 +102,16 @@ void Sys_Exit(void)
/* Shutdown Inputs */ /* Shutdown Inputs */
Close_Inputs(); Close_Inputs();
if (return_to_menu || return_to_priiloader || priiloader_def) Sys_LoadMenu(); if (return_to_menu || return_to_priiloader || priiloader_def)
else if(return_to_bootmii) IOS_ReloadIOS(254); Sys_LoadMenu();
if(WII_LaunchTitle(HBC_108)<0) else if(return_to_bootmii)
if(WII_LaunchTitle(HBC_HAXX)<0) IOS_ReloadIOS(254);
if(WII_LaunchTitle(HBC_JODI)<0)
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0); //else
if(WII_LaunchTitle(HBC_108) < 0)
if(WII_LaunchTitle(HBC_HAXX) < 0)
if(WII_LaunchTitle(HBC_JODI) < 0)
WII_LaunchTitle(0x100000002LL); //SYS_ResetSystem doesnt work properly with new libogc
} }
void __Sys_ResetCallback(void) void __Sys_ResetCallback(void)
@ -130,5 +135,5 @@ void Sys_Init(void)
void Sys_LoadMenu(void) void Sys_LoadMenu(void)
{ {
/* Return to the Wii system menu */ /* Return to the Wii system menu */
SYS_ResetSystem(SYS_RETURNTOMENU, 0, 0); WII_LaunchTitle(0x100000002LL); //SYS_ResetSystem doesnt work properly with new libogc
} }

View File

@ -130,7 +130,6 @@ int main(int argc, char **argv)
ret = menu.main(); ret = menu.main();
} }
} }
vid.cleanup();
if (bootHB) if (bootHB)
{ {
//IOS_ReloadIOS(58); //IOS_ReloadIOS(58);