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.
main
Sasha Szpakowski 2023-01-27 22:30:03 -04:00 committed by Sam Lantinga
parent ba74e76e56
commit d293145ec9
1 changed files with 0 additions and 8 deletions

View File

@ -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.
*/