- fixed: use 'setsizeneeded' more often in the scaling code. recalculating screen geometry for 2D elements when it changes never really hurts.

This commit is contained in:
Rachael Alexanderson 2018-10-14 16:26:52 -04:00
parent cc8112f88d
commit 239b57b41c
1 changed files with 6 additions and 1 deletions

View File

@ -79,17 +79,22 @@ namespace
CUSTOM_CVAR(Float, vid_scalefactor, 1.0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
{
setsizeneeded = true;
if (self < 0.05 || self > 2.0)
self = 1.0;
}
CUSTOM_CVAR(Int, vid_scalemode, 0, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
{
setsizeneeded = true;
if (isOutOfBounds(self))
self = 0;
}
CVAR(Bool, vid_cropaspect, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CUSTOM_CVAR(Bool, vid_cropaspect, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
{
setsizeneeded = true;
}
bool ViewportLinearScale()
{