From fdf17cb5587ecfad1395388281064416b5009d41 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Fri, 9 May 2014 20:48:36 +0200 Subject: [PATCH] Move setting currentRenderVfb_ to NULL to when it's really needed. --- GPU/GLES/Framebuffer.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index 9ce787f6f3..b72f84a0b5 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -1119,10 +1119,7 @@ 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 @@ -1130,6 +1127,7 @@ void FramebufferManager::ReadFramebufferToMemory(VirtualFramebuffer *vfb, bool s #endif if (vfb) { + // We'll pseudo-blit framebuffers here to get a resized and flipped version of vfb. // For now we'll keep these on the same struct as the ones that can get displayed // (and blatantly copy work already done above while at it). @@ -1233,6 +1231,9 @@ void FramebufferManager::ReadFramebufferToMemory(VirtualFramebuffer *vfb, bool s } } #endif + + // Null out currentRenderVfb_ so it gets set again properly. + currentRenderVfb_ = NULL; } }