- reinstated con_scale.

This commit is contained in:
Christoph Oelckers 2022-06-08 16:41:57 +02:00
parent 3f9842dabb
commit eb56eb380e
4 changed files with 10 additions and 4 deletions

View File

@ -247,13 +247,11 @@ int GetUIScale(F2DDrawer* drawer, int altval);
int GetConScale(F2DDrawer* drawer, int altval);
EXTERN_CVAR(Int, uiscale);
EXTERN_CVAR(Int, con_scale);
inline int active_con_scale(F2DDrawer *drawer)
{
// this sets the threshold for upscaling the console font to 2560 x 1440.
int vscale = drawer->GetHeight() / 720;
int hscale = drawer->GetWidth() / 1280;
return max(1, min(vscale, hscale));
return GetConScale(drawer, con_scale);
}
#ifdef DrawText

View File

@ -128,6 +128,11 @@ static GameAtExit *ExitCmdList;
static char *work = NULL;
static int worklen = 0;
CUSTOM_CVAR(Int, con_scale, 0, CVAR_ARCHIVE)
{
if (self < 0) self = 0;
}
CUSTOM_CVAR(Float, con_alpha, 0.75f, CVAR_ARCHIVE)
{
if (self < 0.f) self = 0.f;

View File

@ -374,6 +374,8 @@ void FGameConfigFile::DoGlobalSetup ()
if (var != NULL) var->ResetToDefault();
var = FindCVar("hud_althudscale", NULL);
if (var != NULL) var->ResetToDefault();
var = FindCVar("con_scale", NULL);
if (var != NULL) var->ResetToDefault();
var = FindCVar("con_scaletext", NULL);
if (var != NULL) var->ResetToDefault();
var = FindCVar("uiscale", NULL);

View File

@ -1081,6 +1081,7 @@ OptionMenu "ScalingOptions" protected
// These will need a new control type.
StaticText "$SCALEMNU_OVERRIDE", 1
ScaleSlider "$SCALEMNU_MESSAGES", "con_scaletext", 0.0, 8.0, 1.0, "$SCALEMNU_USEUI"
ScaleSlider "$SCALEMNU_CONSOLE", "con_scale", 0.0, 8.0, 1.0, "$SCALEMNU_USEUI"
ScaleSlider "$SCALEMNU_STATBAR", "st_scale", -1.0, 8.0, 1.0, "$SCALEMNU_USEUI", "$SCALEMNU_USEFS"
ScaleSlider "$SCALEMNU_HUD", "hud_scale", -1.0, 8.0, 1.0, "$SCALEMNU_USEUI", "$SCALEMNU_USEFS"
ScaleSlider "$SCALEMNU_ALTHUD", "hud_althudscale", 0.0, 8.0, 1.0, "$SCALEMNU_USEUI"