cleaned up the scaling options.

- all 5 settings affected by uiscale have been changed to have the exact same semantics: -1, if supported means special scaling, this is available for HUD and status bar, 0 means to use uiscale, any larger value is a direct scaling factor.
- scaling is cut off when the factor is larger than screenwidth/320 or screenheight/200 because anything larger will definitely not fit.
- a lot of code has been cleaned up and consolidated. Especially the message code had an incredible amount of redundancy.
- all scaling options have been moved into a submenu. This menu is not complete, though - it still requires a special menu widget to convey the intended information without confusing the user.
This commit is contained in:
Christoph Oelckers 2017-03-30 02:16:23 +02:00
commit f95c29ad28
12 changed files with 166 additions and 343 deletions

View file

@ -356,12 +356,7 @@ void FGameConfigFile::DoGlobalSetup ()
}
if (last < 213)
{
FBaseCVar *var = FindCVar("hud_scale", NULL);
if (var != NULL)
{
var->ResetToDefault();
}
var = FindCVar("snd_channels", NULL);
auto var = FindCVar("snd_channels", NULL);
if (var != NULL)
{
// old settings were default 32, minimum 8, new settings are default 128, minimum 64.
@ -369,6 +364,21 @@ void FGameConfigFile::DoGlobalSetup ()
if (v.Int < 64) var->ResetToDefault();
}
}
if (last < 214)
{
FBaseCVar *var = FindCVar("hud_scale", NULL);
if (var != NULL) var->ResetToDefault();
var = FindCVar("st_scale", NULL);
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();
}
}
}
}