From 1e915af00207957fd0d38dccc60d59aa39f5c610 Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Tue, 1 Sep 2020 17:00:15 +0700 Subject: [PATCH] Correct gDPTextureRectangle: use ceil(lry) instead of max(lry, uly + 1.0f) It fixes the issue with zero height rectangles, which often contain a garbage, see #2157 --- src/gDP.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gDP.cpp b/src/gDP.cpp index fb85bc72..0bb81c8b 100644 --- a/src/gDP.cpp +++ b/src/gDP.cpp @@ -851,7 +851,7 @@ void gDPTextureRectangle(f32 ulx, f32 uly, f32 lrx, f32 lry, s32 tile, s16 s, s1 lrx += 1.0f; lry += 1.0f; } - lry = max(lry, uly + 1.0f); + lry = ceil(lry); gDPTile *textureTileOrg[2]; textureTileOrg[0] = gSP.textureTile[0];