From 0967af43b340a8809c4fb28761ab47daf63d8030 Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Fri, 10 Aug 2012 13:12:54 +0000 Subject: [PATCH] -fixed short displayed greenscreen on wiiflow boot --- source/gui/video.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/source/gui/video.cpp b/source/gui/video.cpp index 57366993..8e5eb725 100644 --- a/source/gui/video.cpp +++ b/source/gui/video.cpp @@ -120,6 +120,7 @@ void CVideo::setAA(u8 aa, bool alpha, int width, int height) void CVideo::init(void) { + /* General Video Init */ VIDEO_Init(); m_wide = CONF_GetAspectRatio() == CONF_ASPECT_16_9; m_rmode = VIDEO_GetPreferredMode(NULL); @@ -150,15 +151,7 @@ void CVideo::init(void) if(CONF_GetDisplayOffsetH(&hoffset) == 0) m_rmode->viXOrigin += hoffset; - VIDEO_Configure(m_rmode); - VIDEO_SetBlack(FALSE); - VIDEO_Flush(); - VIDEO_WaitVSync(); - if(m_rmode->viTVMode & VI_NON_INTERLACE) - VIDEO_WaitVSync(); - else while(VIDEO_GetNextField()) - VIDEO_WaitVSync(); - + /* GX Init */ m_frameBuf[0] = MEM_K0_TO_K1(SYS_AllocateFramebuffer(m_rmode)); m_frameBuf[1] = MEM_K0_TO_K1(SYS_AllocateFramebuffer(m_rmode)); m_curFB = 0; @@ -194,7 +187,15 @@ void CVideo::init(void) GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0+i, GX_TEX_ST, GX_F32, 0); m_stencil = memalign(32, CVideo::_stencilWidth * CVideo::_stencilHeight); memset(m_stencil, 0, CVideo::_stencilWidth * CVideo::_stencilHeight); + + /* Configure Video */ + VIDEO_Configure(m_rmode); _clearScreen(); + VIDEO_SetBlack(FALSE); + VIDEO_Flush(); + VIDEO_WaitVSync(); + if(m_rmode->viTVMode & VI_NON_INTERLACE) + VIDEO_WaitVSync(); } void CVideo::_clearScreen()