summaryrefslogtreecommitdiff
path: root/platform/osx/os_osx.mm
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-08 11:06:48 +0100
committerGitHub <noreply@github.com>2019-02-08 11:06:48 +0100
commitaa9ec210b9b878f7cfe093ba82715b0a247129b3 (patch)
tree1602426559ed243e657d20600c43587db263479c /platform/osx/os_osx.mm
parent4ddefe91420d1a61c99c3a3319949ff95139e040 (diff)
parent50e2c1e184e7ce2361e2256336392b0b9eaf18c8 (diff)
Merge pull request #25521 from bruvzg/disabled_hidpi_retina_fix
[macOS] Fix rendering on retina displays with HiDPI support disabled.
Diffstat (limited to 'platform/osx/os_osx.mm')
-rw-r--r--platform/osx/os_osx.mm4
1 files changed, 3 insertions, 1 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm
index 3f80d19fa1..6b65c1a529 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/osx/os_osx.mm
@@ -282,7 +282,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