Merge pull request #25521 from bruvzg/disabled_hidpi_retina_fix

[macOS] Fix rendering on retina displays with HiDPI support disabled.
This commit is contained in:
Rémi Verschelde 2019-02-08 11:06:48 +01:00 committed by GitHub
commit aa9ec210b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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