-little modification on video cleanup (we dont need to wait

for vsync if we set black anyways :P)
-added WII_Initialize(); before sys_exit and dml boot,
without we may get a blackscreen
This commit is contained in:
fix94.1 2012-05-19 12:58:43 +00:00
parent 71064e3f77
commit b0e0b005b3
3 changed files with 7 additions and 14 deletions

View File

@ -233,19 +233,16 @@ void CVideo::cleanup(void)
{ {
gprintf("Cleaning up video...\n"); gprintf("Cleaning up video...\n");
VIDEO_ClearFrameBuffer(m_rmode, m_frameBuf[m_curFB], COLOR_BLACK); VIDEO_ClearFrameBuffer(m_rmode, m_frameBuf[0], COLOR_BLACK);
VIDEO_ClearFrameBuffer(m_rmode, m_frameBuf[1], COLOR_BLACK);
render(); render();
VIDEO_ClearFrameBuffer(m_rmode, m_frameBuf[m_curFB], COLOR_BLACK);
render(); render();
GX_DrawDone();
GX_AbortFrame();
VIDEO_SetBlack(TRUE); VIDEO_SetBlack(TRUE);
VIDEO_Flush(); VIDEO_Flush();
VIDEO_WaitVSync();
if(m_rmode->viTVMode & VI_NON_INTERLACE) GX_DrawDone();
VIDEO_WaitVSync(); GX_AbortFrame();
for(u8 i = 0; i < sizeof m_aaBuffer / sizeof m_aaBuffer[0]; ++i) for(u8 i = 0; i < sizeof m_aaBuffer / sizeof m_aaBuffer[0]; ++i)
{ {

View File

@ -86,17 +86,11 @@ 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)
{
*(vu32*)0x8132FFFB = 0x50756e65; *(vu32*)0x8132FFFB = 0x50756e65;
}
else if(return_to_priiloader) else if(return_to_priiloader)
{
*(vu32*)0x8132FFFB = 0x4461636f; *(vu32*)0x8132FFFB = 0x4461636f;
}
else else
{
*(vu32*)0x8132FFFB = 0xffffffff; *(vu32*)0x8132FFFB = 0xffffffff;
}
DCFlushRange((void *)(0x8132FFFB), 4); DCFlushRange((void *)(0x8132FFFB), 4);
} }
@ -108,6 +102,7 @@ void Sys_Exit(void)
/* Shutdown Inputs */ /* Shutdown Inputs */
Close_Inputs(); Close_Inputs();
WII_Initialize();
if(return_to_menu || return_to_priiloader || priiloader_def) if(return_to_menu || return_to_priiloader || priiloader_def)
Sys_LoadMenu(); Sys_LoadMenu();
else if(return_to_bootmii) else if(return_to_bootmii)

View File

@ -761,6 +761,7 @@ void CMenu::_launchGC(dir_discHdr *hdr, bool DML)
GC_SetLanguage(GClanguage); GC_SetLanguage(GClanguage);
DML_New_WriteOptions(); DML_New_WriteOptions();
WII_Initialize();
if(WII_LaunchTitle(0x100000100LL) < 0) if(WII_LaunchTitle(0x100000100LL) < 0)
Sys_LoadMenu(); Sys_LoadMenu();
} }