From 6c514a4cc4925dafd47110c220bcd348050a9598 Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Fri, 4 Sep 2020 08:39:01 -0400 Subject: [PATCH] - For status bars for the Unity iwad - only force offsets if the width is greater than 320. --- src/d_main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/d_main.cpp b/src/d_main.cpp index 8990c82bd..44d8caf39 100644 --- a/src/d_main.cpp +++ b/src/d_main.cpp @@ -2969,8 +2969,11 @@ static void FixUnityStatusBar() FGameTexture* sbartex = TexMan.FindGameTexture("stbar", ETextureType::MiscPatch); if (!sbartex) return; - sbartex->SetOffsets(0, (sbartex->GetTexelWidth() - 320) / 2, 0); - sbartex->SetOffsets(1, (sbartex->GetTexelWidth() - 320) / 2, 0); + if (sbartex->GetTexelWidth() > 320) + { + sbartex->SetOffsets(0, (sbartex->GetTexelWidth() - 320) / 2, 0); + sbartex->SetOffsets(1, (sbartex->GetTexelWidth() - 320) / 2, 0); + } } }