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
This commit is contained in:
Alug committed 2026-02-03 22:02:01 +01:00
1 parent b8b0c1ebcf
commit 3475ce3fbe
1 file changed
+3 -2
+3 -2
View File
@@ -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