From 8ff7da8df5c68b63c5f97888447be1a919eb8f89 Mon Sep 17 00:00:00 2001 From: "fix94.1" Date: Thu, 17 May 2012 16:29:53 +0000 Subject: [PATCH] -we may should set black before clearing the framebuffer, looks ugly otherwise :P --- source/gui/video.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/source/gui/video.cpp b/source/gui/video.cpp index a86c9d88..ffce19b8 100644 --- a/source/gui/video.cpp +++ b/source/gui/video.cpp @@ -140,14 +140,7 @@ void CVideo::init(void) m_frameBuf[1] = MEM_K0_TO_K1(SYS_AllocateFramebuffer(m_rmode)); VIDEO_Configure(m_rmode); m_curFB = 0; - VIDEO_SetNextFramebuffer(m_frameBuf[m_curFB]); - VIDEO_ClearFrameBuffer(m_rmode, m_frameBuf[m_curFB], COLOR_BLACK); - m_curFB ^= 1; - VIDEO_SetNextFramebuffer(m_frameBuf[m_curFB]); - VIDEO_ClearFrameBuffer(m_rmode, m_frameBuf[m_curFB], COLOR_BLACK); - m_curFB ^= 1; - VIDEO_SetNextFramebuffer(m_frameBuf[m_curFB]); - VIDEO_SetBlack(FALSE); + VIDEO_SetBlack(TRUE); VIDEO_Flush(); VIDEO_WaitVSync(); if (m_rmode->viTVMode & VI_NON_INTERLACE) @@ -178,6 +171,12 @@ void CVideo::init(void) GX_SetNumChans(0); GX_SetZCompLoc(GX_ENABLE); setup2DProjection(); + VIDEO_ClearFrameBuffer(m_rmode, m_frameBuf[m_curFB], COLOR_BLACK); + render(); + VIDEO_ClearFrameBuffer(m_rmode, m_frameBuf[m_curFB], COLOR_BLACK); + render(); + VIDEO_SetBlack(FALSE); + VIDEO_Flush(); m_stencil = MEM1_memalign(32, CVideo::_stencilWidth * CVideo::_stencilHeight); memset(m_stencil, 0, CVideo::_stencilWidth * CVideo::_stencilHeight); }