From 119edd34e6d47d252a97d7afb3e962994faa7ccc Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 14 Jun 2014 01:56:34 -0700 Subject: [PATCH] Avoid shrinking buffer w/h in throughmode. Since they could overdraw and we already scissor. --- GPU/GLES/Framebuffer.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index 13e8088ef4..8bc5365619 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -869,8 +869,14 @@ void FramebufferManager::DoSetRenderFrameBuffer() { // Update fb stride in case it changed vfb->fb_stride = fb_stride; v->format = fmt; - v->width = drawing_width; - v->height = drawing_height; + // In throughmode, a higher height could be used. Let's avoid shrinking the buffer. + if (gstate.isModeThrough() && (int)v->width < fb_stride) { + v->width = std::max((int)v->width, drawing_width); + v->height = std::max((int)v->height, drawing_height); + } else { + v->width = drawing_width; + v->height = drawing_height; + } break; } }