From 502cbc170aace96964fd0224f5d0cdadeef09d5e Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Thu, 7 Nov 2013 15:27:21 +0100 Subject: [PATCH] Revert "Another attempt to sizing framebuffer based on fmt" This reverts commit c0e8893560b74b5e9b19104584faa2578f576925. --- GPU/GLES/Framebuffer.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index f8712bf363..9fb175a7e5 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -663,18 +663,14 @@ 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)) { - if (v->format == fmt) { - // Let's not be so picky for now. Let's say this is the one. - vfb = v; - vfb->fb_stride = fb_stride; - break; - } else { - DestroyFramebuf(v); - vfbs_.erase(vfbs_.begin() + i--); - break; - } - } + 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. + vfb = v; + // Update fb stride in case it changed + vfb->fb_stride = fb_stride; + v->format = fmt; + break; + } } float renderWidthFactor = (float)PSP_CoreParameter().renderWidth / 480.0f;