From 7e3688d6a0b0eb692a30c01e7722d0a7f87100c5 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Thu, 9 Apr 2015 20:32:43 +0600 Subject: [PATCH] Move rameBufferList().setBufferChanged() call to the top of gDPFillRectangle. --- gDP.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gDP.cpp b/gDP.cpp index 0212a150..0da171cf 100644 --- a/gDP.cpp +++ b/gDP.cpp @@ -774,6 +774,7 @@ void gDPFillRectangle( s32 ulx, s32 uly, s32 lrx, s32 lry ) ++lry; } else if (lry == uly) ++lry; + if (gDP.depthImageAddress == gDP.colorImage.address) { // Game may use depth texture as auxilary color texture. Example: Mario Tennis // If color is not depth clear color, that is most likely the case @@ -789,6 +790,8 @@ void gDPFillRectangle( s32 ulx, s32 uly, s32 lrx, s32 lry ) return; } + frameBufferList().setBufferChanged(); + f32 fillColor[4]; gDPGetFillColor(fillColor); if (gDP.otherMode.cycleType == G_CYC_FILL) { @@ -806,7 +809,6 @@ void gDPFillRectangle( s32 ulx, s32 uly, s32 lrx, s32 lry ) render.drawRect(ulx, uly, lrx, lry, fillColor); - frameBufferList().setBufferChanged(); if (gDP.otherMode.cycleType == G_CYC_FILL) { if (lry > (u32)gDP.scissor.lry) gDP.colorImage.height = (u32)max(gDP.colorImage.height, (u32)gDP.scissor.lry);