From ce25b5bc41b4f25eb22ae93799601ec713dd8eb5 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 4 Oct 2020 15:05:00 +0200 Subject: [PATCH] - fixed: The scripted DrawFrame export should not be subjected to ui_screenborder_classic_scaling. This affected the generic player display where the frame was far too wide. At most it needs to be an option if properly corrected. --- src/g_statusbar/shared_sbar.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/g_statusbar/shared_sbar.cpp b/src/g_statusbar/shared_sbar.cpp index 1de65415e..7722ee51e 100644 --- a/src/g_statusbar/shared_sbar.cpp +++ b/src/g_statusbar/shared_sbar.cpp @@ -153,7 +153,7 @@ CVAR (Bool, idmypos, false, 0); // //========================================================================== -void V_DrawFrame(F2DDrawer* drawer, int left, int top, int width, int height) +void V_DrawFrame(F2DDrawer* drawer, int left, int top, int width, int height, bool scalemode) { FGameTexture* p; const gameborder_t* border = &gameinfo.Border; @@ -167,7 +167,7 @@ void V_DrawFrame(F2DDrawer* drawer, int left, int top, int width, int height) float sw = drawer->GetClassicFlatScalarWidth(); float sh = drawer->GetClassicFlatScalarHeight(); - if (!ui_screenborder_classic_scaling) + if (!scalemode) { // Draw top and bottom sides. p = TexMan.GetGameTextureByName(border->t); @@ -221,7 +221,7 @@ DEFINE_ACTION_FUNCTION(_Screen, DrawFrame) PARAM_INT(w); PARAM_INT(h); if (!twod->HasBegun2D()) ThrowAbortException(X_OTHER, "Attempt to draw to screen outside a draw function"); - V_DrawFrame(twod, x, y, w, h); + V_DrawFrame(twod, x, y, w, h, false); return 0; } @@ -1048,7 +1048,7 @@ void DBaseStatusBar::RefreshViewBorder () DrawBorder(twod, tex, viewwindowx + viewwidth, viewwindowy, Width, viewheight + viewwindowy); DrawBorder(twod, tex, 0, viewwindowy + viewheight, Width, StatusBar->GetTopOfStatusbar()); - V_DrawFrame(twod, viewwindowx, viewwindowy, viewwidth, viewheight); + V_DrawFrame(twod, viewwindowx, viewwindowy, viewwidth, viewheight, ui_screenborder_classic_scaling); } }