diff --git a/GPU/GLES/Framebuffer.cpp b/GPU/GLES/Framebuffer.cpp index d5fb17fa56..a5713cd730 100644 --- a/GPU/GLES/Framebuffer.cpp +++ b/GPU/GLES/Framebuffer.cpp @@ -389,8 +389,13 @@ void GuessDrawingSize(int &drawing_width, int &drawing_height) { drawing_width = 480; drawing_height = 272; } else { - drawing_width = std::min(drawing_width, 512); - drawing_height = std::min(drawing_height, 512); + // New attempt: Use the max of region and scissor. Round to even number as games are highly inconsistent . + int scissorX2 = (gstate.getScissorX2() + 1) & ~1; + int regionX2 = (gstate.getRegionX2() + 1) & ~1; + int scissorY2 = (gstate.getScissorY2() + 1) & ~1; + int regionY2 = (gstate.getRegionY2() + 1) & ~1; + drawing_width = std::min(512, std::max(scissorX2, regionX2)); + drawing_height = std::min(512, std::max(scissorY2, regionY2)); } } diff --git a/GPU/GPUState.h b/GPU/GPUState.h index 9ddc63d4fa..d13057810b 100644 --- a/GPU/GPUState.h +++ b/GPU/GPUState.h @@ -226,6 +226,11 @@ struct GPUgstate int getScissorX2() const { return scissor2 & 0x3FF; } int getScissorY2() const { return (scissor2 >> 10) & 0x3FF; } + int getRegionX1() const { return region1 & 0x3FF; } + int getRegionY1() const { return (region1 >> 10) & 0x3FF; } + int getRegionX2() const { return (region2 & 0x3FF); } + int getRegionY2() const { return ((region2 >> 10) & 0x3FF); } + // Vertex type bool isModeThrough() const { return (vertType & GE_VTYPE_THROUGH) != 0; } int getNumBoneWeights() const {