From d293145ec9425c4758fb2ed5cf3ce70f549fbc69 Mon Sep 17 00:00:00 2001
From: Sasha Szpakowski <[EMAIL REDACTED]>
Date: Fri, 27 Jan 2023 22:30:03 -0400
Subject: [PATCH] macOS: include @1x display modes with the same point-size as
@2x modes
Previously they were discarded because SDL didn't expose enough information for apps to differentiate between a low-dpi and high-dpi mode which had the same size in DPI-scaled points. Now the information is available in SDL_DisplayMode.
Fixes #3025.
---
src/video/cocoa/SDL_cocoamodes.m | 8 --------
1 file changed, 8 deletions(-)
diff --git a/src/video/cocoa/SDL_cocoamodes.m b/src/video/cocoa/SDL_cocoamodes.m
index ecb71d7f2096..aacf4956b7df 100644
--- a/src/video/cocoa/SDL_cocoamodes.m
+++ b/src/video/cocoa/SDL_cocoamodes.m
@@ -204,14 +204,6 @@ static SDL_bool GetDisplayMode(_THIS, CGDisplayModeRef vidmode, SDL_bool vidmode
otherformat = GetDisplayModePixelFormat(othermode);
otherGUI = CGDisplayModeIsUsableForDesktopGUI(othermode);
- /* Ignore this mode if it's low-dpi (@1x) and we have a high-dpi
- * mode in the list with the same size in points.
- */
- if (width == pixelW && height == pixelH && width == otherW && height == otherH && refreshrate == otherrefresh && format == otherformat && (otherpixelW != otherW || otherpixelH != otherH)) {
- CFRelease(modes);
- return SDL_FALSE;
- }
-
/* Ignore this mode if it's interlaced and there's a non-interlaced
* mode in the list with the same properties.
*/