Skip to content

Commit

Permalink
- refinement of the statusbar offset fix to only affect unscaled text…
Browse files Browse the repository at this point in the history
…ures.
  • Loading branch information
coelckers committed Oct 24, 2020
1 parent 79944ca commit 8872f86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/d_main.cpp
Expand Up @@ -2968,8 +2968,8 @@ static void FixWideStatusBar()
{
FGameTexture* sbartex = TexMan.FindGameTexture("stbar", ETextureType::MiscPatch);

// only adjust offsets if none already exist
if (sbartex && sbartex->GetTexelWidth() > 320 &&
// only adjust offsets if none already exist and if the texture is not scaled. For scaled textures a proper offset is needed.
if (sbartex && sbartex->GetTexelWidth() > 320 && sbartex->GetScaleX() == 1 &&
!sbartex->GetTexelLeftOffset(0) && !sbartex->GetTexelTopOffset(0))
{
sbartex->SetOffsets(0, (sbartex->GetTexelWidth() - 320) / 2, 0);
Expand Down

0 comments on commit 8872f86

Please sign in to comment.