From cf7229e05e2664d08b9b5c798575a6fa47cb3056 Mon Sep 17 00:00:00 2001 From: raven02 Date: Fri, 9 May 2014 19:42:34 +0800 Subject: [PATCH] Null out currentRenderVfb_ This fixes the missing stuffs in Tactic Orge --- GPU/GLES/Framebuffer.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index daf344c56f..d9a00594cd 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -851,7 +851,7 @@ void FramebufferManager::DoSetRenderFrameBuffer() { } else if (vfb != currentRenderVfb_) { if (updateVRAM_ && !vfb->memoryUpdated) { - ReadFramebufferToMemory(vfb, true, 0, 0, 480, 272); + ReadFramebufferToMemory(vfb, true, 0, 0, vfb->width, vfb->height); } // Use it as a render target. DEBUG_LOG(SCEGE, "Switching render target to FBO for %08x: %i x %i x %i ", vfb->fb_address, vfb->width, vfb->height, vfb->format); @@ -1119,6 +1119,10 @@ void FramebufferManager::CopyDisplayToOutput() { } void FramebufferManager::ReadFramebufferToMemory(VirtualFramebuffer *vfb, bool sync, int x, int y, int w, int h) { + + // Null out currentRenderVfb_ + currentRenderVfb_ = NULL; + #ifndef USING_GLES2 if (sync) { PackFramebufferAsync_(NULL); // flush async just in case when we go for synchronous update