From 3475ce3fbe792fd6463c68bfc5a4e2b359acdc9a Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 3 Feb 2026 22:02:01 +0100 Subject: [PATCH] fix adding bogus resolutions into the resolution list when setting a new defaultres CV_SetValue will call the callbacks each, which means when it sets the width, the height cvar will not be updated yet, which most definitely will not be in the modelist, so it will add it regardless --- src/screen.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/screen.c b/src/screen.c index 13cc76e5d..5d34c6ccf 100644 --- a/src/screen.c +++ b/src/screen.c @@ -315,8 +315,9 @@ void SCR_CheckDefaultMode(void) void SCR_SetDefaultMode(void) { // remember the default screen size - CV_SetValue(&cv_scr_width, vid.width); - CV_SetValue(&cv_scr_height, vid.height); + CV_StealthSetValue(&cv_scr_width, vid.width); + CV_StealthSetValue(&cv_scr_height, vid.height); + VID_RefreshModeList(); // probably not needed but justin käs } // Change fullscreen on/off according to cv_fullscreen