From 483d86588c6adb6a840534cbe665f62581728ff1 Mon Sep 17 00:00:00 2001 From: Frank Praznik Date: Mon, 25 May 2026 11:25:02 -0400 Subject: [PATCH] video: Only ignore modes with a lower color depth in SDL_GetClosestFullscreenDisplayMode() If a mode with a closer refresh was found, but it had the same color depth as the current best match, it was being dropped. Only ignore the new mode if the color depth is below the current best match. (cherry picked from commit cd0b796a6eaecdb7840cbe928794218391ec1a63) --- src/video/SDL_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/SDL_video.c b/src/video/SDL_video.c index 2ad194c91b..48ed85a20a 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -1426,7 +1426,7 @@ bool SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h, * refresh rate target */ continue; } - if (SDL_BYTESPERPIXEL(closest->format) >= SDL_BYTESPERPIXEL(mode->format)) { + if (SDL_BYTESPERPIXEL(closest->format) > SDL_BYTESPERPIXEL(mode->format)) { // Prefer the highest color depth continue; }