From 467ecf822448bf7b39e3f8222d6de0fdc68de297 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 5f52b8d97..a0e884bc1 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