Răsfoiți Sursa

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.
Frank Praznik 1 lună în urmă
părinte
comite
cd0b796a6e
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      src/video/SDL_video.c

+ 1 - 1
src/video/SDL_video.c

@@ -1430,7 +1430,7 @@ bool SDL_GetClosestFullscreenDisplayMode(SDL_DisplayID displayID, int w, int h,
                      * refresh rate target */
                      * refresh rate target */
                     continue;
                     continue;
                 }
                 }
-                if (SDL_BYTESPERPIXEL(closest->format) >= SDL_BYTESPERPIXEL(mode->format)) {
+                if (SDL_BYTESPERPIXEL(closest->format) > SDL_BYTESPERPIXEL(mode->format)) {
                     // Prefer the highest color depth
                     // Prefer the highest color depth
                     continue;
                     continue;
                 }
                 }