From cd0b796a6eaecdb7840cbe928794218391ec1a63 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. --- 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 36f3dc89f5..98fd06d2b3 100644 --- a/src/video/SDL_video.c +++ b/src/video/SDL_video.c @@ -1430,7 +1430,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; }