From ff55e5bea9525329f4e5ef1f123292a5be26f582 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Tue, 4 Oct 2016 21:22:20 +0700 Subject: [PATCH] Apply scissor to all input coordinates in FrameBufferList::fillRDRAM. Fixed Super Smash Bros Intro not playing with Framebuffer Emulation enabled #1154 --- src/FrameBuffer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FrameBuffer.cpp b/src/FrameBuffer.cpp index 05efced9..77028a62 100644 --- a/src/FrameBuffer.cpp +++ b/src/FrameBuffer.cpp @@ -961,9 +961,9 @@ void FrameBufferList::fillRDRAM(s32 ulx, s32 uly, s32 lrx, s32 lry) if (m_pCurrent == nullptr) return; - ulx = max(0, ulx); - lrx = min(gDP.colorImage.width, (u32)lrx); - uly = max(0, uly); + ulx = min(max((float)ulx, gDP.scissor.ulx), gDP.scissor.lrx); + lrx = min(max((float)lrx, gDP.scissor.ulx), gDP.scissor.lrx); + uly = min(max((float)uly, gDP.scissor.uly), gDP.scissor.lry); lry = min(max((float)lry, gDP.scissor.uly), gDP.scissor.lry); const u32 stride = gDP.colorImage.width << gDP.colorImage.size >> 1;