- 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.
This commit is contained in:
Christoph Oelckers 2020-10-04 15:05:00 +02:00
parent f1b0f32786
commit ce25b5bc41

View file

@ -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);
}
}