From 239b57b41c50ddbfdf198a930e7b4cb6b2b8cf9e Mon Sep 17 00:00:00 2001 From: Rachael Alexanderson Date: Sun, 14 Oct 2018 16:26:52 -0400 Subject: [PATCH] - fixed: use 'setsizeneeded' more often in the scaling code. recalculating screen geometry for 2D elements when it changes never really hurts. --- src/r_videoscale.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/r_videoscale.cpp b/src/r_videoscale.cpp index 4da84849b..420d2fc8b 100644 --- a/src/r_videoscale.cpp +++ b/src/r_videoscale.cpp @@ -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() {