From 4635e24d62942a939529193523a947ca74cd5fa9 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Sat, 23 Nov 2013 14:46:11 +0700 Subject: [PATCH] Add g_bIgnoreCFB option. It is necessary for Zelda Pause Screen, otherwise it will be replaced by blank data from RDRAM. --- FrameBuffer.cpp | 3 ++- FrameBuffer.h | 1 + VI.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/FrameBuffer.cpp b/FrameBuffer.cpp index 2b65593c..74bdea2a 100644 --- a/FrameBuffer.cpp +++ b/FrameBuffer.cpp @@ -18,8 +18,9 @@ bool g_bCopyToRDRAM = false; bool g_bCopyFromRDRAM = false; -bool g_bCopyDepthToRDRAM = true; +bool g_bCopyDepthToRDRAM = false; bool g_bUseFloatDepthTexture = true; +bool g_bIgnoreCFB = true; static const GLint depthTextureInternalFormat = g_bUseFloatDepthTexture ? GL_R32F : GL_R16; static const GLenum depthTextureType = g_bUseFloatDepthTexture ? GL_FLOAT : GL_UNSIGNED_INT; diff --git a/FrameBuffer.h b/FrameBuffer.h index 36a34715..e66ac8ca 100644 --- a/FrameBuffer.h +++ b/FrameBuffer.h @@ -33,6 +33,7 @@ extern bool g_bCopyToRDRAM; extern bool g_bCopyDepthToRDRAM; extern bool g_bCopyFromRDRAM; extern bool g_bUseFloatDepthTexture; +extern bool g_bIgnoreCFB; void FrameBuffer_Init(); void FrameBuffer_Destroy(); diff --git a/VI.cpp b/VI.cpp index 5493b2d9..622eeeef 100644 --- a/VI.cpp +++ b/VI.cpp @@ -53,7 +53,7 @@ void VI_UpdateScreen() VI.vStart = VI.vEnd = 0; if (OGL.frameBufferTextures) { - const bool bCFB = (gSP.changed&CHANGED_CPU_FB_WRITE) == CHANGED_CPU_FB_WRITE; + const bool bCFB = !g_bIgnoreCFB && (gSP.changed&CHANGED_CPU_FB_WRITE) == CHANGED_CPU_FB_WRITE; const bool bNeedUpdate = bCFB ? true : (*REG.VI_ORIGIN != VI.lastOrigin);// && gDP.colorImage.changed; if (bNeedUpdate) {