From a05413d925f1df856c4e27b64482c8beb78f884f Mon Sep 17 00:00:00 2001 From: Alug Date: Mon, 24 Nov 2025 20:49:09 +0100 Subject: [PATCH] fix erronous "Could not set custom resolution" warning on startup the cvars may have not been initialised yet to anything just return -2 and ignore --- src/sdl/i_video.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index b5ce0d4d5..ef7f439b0 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -1575,6 +1575,10 @@ static int IsCustomResolutionInList(int list_size) INT32 custom_w = cv_scr_width.value; INT32 custom_h = cv_scr_height.value; + // startup + if (!custom_w || !custom_h) + return -2; + // invalid resolution // dont even attempt to add it if (custom_w < BASEVIDWIDTH || custom_w > MAXVIDWIDTH