Skip to content

Commit

Permalink
fix super-wide (1600px) status bar graphic alignment (#2142)
Browse files Browse the repository at this point in the history
* fix super-wide (1600px) status bar graphic alignment

Fixes #2140

* use formula from Eternity Engine

* drop casts

* use DIV_ROUND_FLOOR()
  • Loading branch information
fabiangreffrath authored Jan 16, 2025
1 parent f9b9f23 commit 7346d17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/v_video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7346d17

Please sign in to comment.