From 68ce59a12dc76f9885a208d3264a67ffebafbb76 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Sun, 13 Oct 2019 23:15:20 +0300 Subject: [PATCH] Fix non-HiDPI mode on HiDPI displays on macOS Catalina. (cherry picked from commit 509afcea92ee12649a8bed982ae6bff7bc984c7c) --- platform/osx/os_osx.mm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 6a98256baea..18223d881bf 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -280,6 +280,8 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt CGFloat oldBackingScaleFactor = [[[notification userInfo] objectForKey:@"NSBackingPropertyOldScaleFactorKey"] doubleValue]; if (OS_OSX::singleton->is_hidpi_allowed()) { [OS_OSX::singleton->window_view setWantsBestResolutionOpenGLSurface:YES]; + } else { + [OS_OSX::singleton->window_view setWantsBestResolutionOpenGLSurface:NO]; } if (newBackingScaleFactor != oldBackingScaleFactor) { @@ -1136,6 +1138,8 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a [window_view setWantsBestResolutionOpenGLSurface:YES]; //if (current_videomode.resizable) [window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; + } else { + [window_view setWantsBestResolutionOpenGLSurface:NO]; } //[window_object setTitle:[NSString stringWithUTF8String:"GodotEnginies"]];