Merge pull request #32809 from bruvzg/macos_1015_non_hidpi_fix

Fix non-HiDPI mode on HiDPI displays on macOS Catalina.
This commit is contained in:
Rémi Verschelde 2019-10-13 22:48:05 +02:00 committed by GitHub
commit 1fed266bf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -339,6 +339,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) {
@ -1492,6 +1494,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"]];