|
@@ -1486,10 +1486,11 @@ Cocoa_CreateWindow(_THIS, SDL_Window * window)
|
|
|
#pragma clang diagnostic push
|
|
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
|
#endif
|
|
|
- if (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) {
|
|
|
- if ([contentView respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)]) {
|
|
|
- [contentView setWantsBestResolutionOpenGLSurface:YES];
|
|
|
- }
|
|
|
+ /* Note: as of the macOS 10.15 SDK, this defaults to YES instead of NO when
|
|
|
+ * the NSHighResolutionCapable boolean is set in Info.plist. */
|
|
|
+ if ([contentView respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)]) {
|
|
|
+ BOOL highdpi = (window->flags & SDL_WINDOW_ALLOW_HIGHDPI) != 0;
|
|
|
+ [contentView setWantsBestResolutionOpenGLSurface:highdpi];
|
|
|
}
|
|
|
#ifdef __clang__
|
|
|
#pragma clang diagnostic pop
|