From e4599870f363b81788e42f72016e2de5976ddab3 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Wed, 1 Apr 2015 19:06:14 +0600 Subject: [PATCH] Minor corrections in DepthBufferToRDRAM::CopyToRDRAM --- FrameBuffer.cpp | 4 ++-- OpenGL.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/FrameBuffer.cpp b/FrameBuffer.cpp index 0452a601..61a92ab3 100644 --- a/FrameBuffer.cpp +++ b/FrameBuffer.cpp @@ -939,7 +939,7 @@ bool DepthBufferToRDRAM::CopyToRDRAM( u32 _address) { if (VI.width == 0) // H width is zero. Don't copy return false; if (m_lastDList == RSP.DList) // Already read; - return false; + return true; FrameBuffer *pBuffer = frameBufferList().findBuffer(_address); if (pBuffer == NULL || pBuffer->m_width < VI.width || pBuffer->m_pDepthBuffer == NULL || !pBuffer->m_pDepthBuffer->m_cleared) return false; @@ -996,7 +996,7 @@ bool DepthBufferToRDRAM::CopyToRDRAM( u32 _address) { glUnmapBuffer(GL_PIXEL_PACK_BUFFER); glBindFramebuffer(GL_READ_FRAMEBUFFER, 0); - glEnable(GL_SCISSOR_TEST); + gDP.changed |= CHANGED_SCISSOR; return true; } #endif // GLES2 diff --git a/OpenGL.cpp b/OpenGL.cpp index 3206646d..4f93a901 100644 --- a/OpenGL.cpp +++ b/OpenGL.cpp @@ -946,10 +946,10 @@ bool texturedRectDepthBufferCopy(const OGLRender::TexturedRectParams & _params) // Load of arbitrary data to that area causes weird camera rotation in CBFD. const gDPTile * pTile = gSP.textureTile[0]; if (pTile->loadType == LOADTYPE_BLOCK && gDP.textureImage.size == 2 && gDP.textureImage.address >= gDP.depthImageAddress && gDP.textureImage.address < (gDP.depthImageAddress + gDP.colorImage.width*gDP.colorImage.width * 6 / 4)) { - if (!config.frameBufferEmulation.enable) + if (config.frameBufferEmulation.enable == 0) return true; frameBufferList().getCurrent()->m_cleared = true; - if (!config.frameBufferEmulation.copyDepthToRDRAM) + if (config.frameBufferEmulation.copyDepthToRDRAM == 0) return true; if (FrameBuffer_CopyDepthBuffer(gDP.colorImage.address)) RDP_RepeatLastLoadBlock();