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);