From 4944b605d4894e3a614535bba60f17dacb9b4b44 Mon Sep 17 00:00:00 2001 From: James R Date: Wed, 26 Apr 2023 07:35:31 -0700 Subject: [PATCH] V_DrawStretchyFixedPatch: round bottom y value to nearest integer Fixes 1px overshoot at some scales. --- src/v_video.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v_video.cpp b/src/v_video.cpp index 262b07506..e60a5462d 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -891,7 +891,7 @@ void V_DrawStretchyFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vsca float fx = x; float fy = y; float fx2 = fx + pwidth; - float fy2 = fy + static_cast(patch->height) * fdupy; + float fy2 = fy + std::round(static_cast(patch->height) * fdupy); float falpha = 1.f; float umin = 0.f; float umax = 1.f;