From 7c6a4cf87e639a299b01b9c9929f5519eabdbe91 Mon Sep 17 00:00:00 2001 From: raven02 Date: Sun, 10 Nov 2013 10:38:33 +0800 Subject: [PATCH] Attempt for another matching framebuffer logic --- GPU/GLES/Framebuffer.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index 9fb175a7e..f29dc626c 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -663,12 +663,15 @@ void FramebufferManager::SetRenderFrameBuffer() { VirtualFramebuffer *vfb = 0; for (size_t i = 0; i < vfbs_.size(); ++i) { VirtualFramebuffer *v = vfbs_[i]; - if (MaskedEqual(v->fb_address, fb_address) && v->width >= drawing_width && v->height >= drawing_height) { - // Let's not be so picky for now. Let's say this is the one. + if (MaskedEqual(v->fb_address, fb_address)) { vfb = v; // Update fb stride in case it changed vfb->fb_stride = fb_stride; - v->format = fmt; + if (v->format != fmt) { + v->width = drawing_width; + v->height = drawing_height; + v->format = fmt; + } break; } }