- For status bars for the Unity iwad - only force offsets if the width is greater than 320.

This commit is contained in:
Rachael Alexanderson 2020-09-04 08:39:01 -04:00
parent 0204051381
commit 6c514a4cc4

View file

@ -2969,8 +2969,11 @@ static void FixUnityStatusBar()
FGameTexture* sbartex = TexMan.FindGameTexture("stbar", ETextureType::MiscPatch); FGameTexture* sbartex = TexMan.FindGameTexture("stbar", ETextureType::MiscPatch);
if (!sbartex) if (!sbartex)
return; return;
sbartex->SetOffsets(0, (sbartex->GetTexelWidth() - 320) / 2, 0); if (sbartex->GetTexelWidth() > 320)
sbartex->SetOffsets(1, (sbartex->GetTexelWidth() - 320) / 2, 0); {
sbartex->SetOffsets(0, (sbartex->GetTexelWidth() - 320) / 2, 0);
sbartex->SetOffsets(1, (sbartex->GetTexelWidth() - 320) / 2, 0);
}
} }
} }