mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- fixed auto-scaling for console.
This commit is contained in:
parent
e266fb1c16
commit
a59436c4c2
5 changed files with 5 additions and 11 deletions
|
@ -163,7 +163,7 @@ int GetConScale(F2DDrawer* drawer, int altval)
|
|||
else if (uiscale == 0)
|
||||
{
|
||||
// Default should try to scale to 640x400
|
||||
int vscale = drawer->GetHeight() / 800;
|
||||
int vscale = drawer->GetHeight() / 720;
|
||||
int hscale = drawer->GetWidth() / 1280;
|
||||
scaleval = max(1, min(vscale, hscale));
|
||||
}
|
||||
|
|
|
@ -247,11 +247,13 @@ 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)
|
||||
{
|
||||
return GetConScale(drawer, con_scale);
|
||||
// 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));
|
||||
}
|
||||
|
||||
#ifdef DrawText
|
||||
|
|
|
@ -128,11 +128,6 @@ 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;
|
||||
|
|
|
@ -374,8 +374,6 @@ 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);
|
||||
|
|
|
@ -1081,7 +1081,6 @@ 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"
|
||||
|
|
Loading…
Reference in a new issue