From 7346d178a23ff60c373ab97db4d680eb8c5d1199 Mon Sep 17 00:00:00 2001 From: Fabian Greffrath Date: Thu, 16 Jan 2025 06:15:46 +0100 Subject: [PATCH] fix super-wide (1600px) status bar graphic alignment (#2142) * fix super-wide (1600px) status bar graphic alignment Fixes #2140 * use formula from Eternity Engine * drop casts * use DIV_ROUND_FLOOR() --- src/v_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/v_video.c b/src/v_video.c index b5281605f..470910bf5 100644 --- a/src/v_video.c +++ b/src/v_video.c @@ -402,7 +402,7 @@ static void DrawPatchInternal(int x, int y, patch_t *patch, boolean flipped) } else // too far off-screen { - x1 = (x1 * video.xscale) >> FRACBITS; + x1 = -(DIV_ROUND_FLOOR(video.width * (-x1 - 1), video.unscaledw)); } if (x2 < video.unscaledw)