From 84a227b6636886e4b3111e3c4d9d974107fbcc89 Mon Sep 17 00:00:00 2001 From: bruvzg <7645683+bruvzg@users.noreply.github.com> Date: Thu, 31 Jan 2019 19:24:57 +0200 Subject: [PATCH] [macOS] Fix rendering on retina displays with HiDPI support disabled. (cherry picked from commit 50e2c1e184e7ce2361e2256336392b0b9eaf18c8) --- platform/osx/os_osx.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 1c30e7dfb0f..6a98256baea 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -278,7 +278,9 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt NSWindow *window = (NSWindow *)[notification object]; CGFloat newBackingScaleFactor = [window backingScaleFactor]; CGFloat oldBackingScaleFactor = [[[notification userInfo] objectForKey:@"NSBackingPropertyOldScaleFactorKey"] doubleValue]; - [OS_OSX::singleton->window_view setWantsBestResolutionOpenGLSurface:YES]; + if (OS_OSX::singleton->is_hidpi_allowed()) { + [OS_OSX::singleton->window_view setWantsBestResolutionOpenGLSurface:YES]; + } if (newBackingScaleFactor != oldBackingScaleFactor) { //Set new display scale and window size