Fix non-HiDPI mode on HiDPI displays on macOS Catalina.
(cherry picked from commit 509afcea92
)
This commit is contained in:
parent
4b6e405f1d
commit
8033270852
|
@ -284,6 +284,8 @@ static CVReturn DisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTimeSt
|
||||||
CGFloat oldBackingScaleFactor = [[[notification userInfo] objectForKey:@"NSBackingPropertyOldScaleFactorKey"] doubleValue];
|
CGFloat oldBackingScaleFactor = [[[notification userInfo] objectForKey:@"NSBackingPropertyOldScaleFactorKey"] doubleValue];
|
||||||
if (OS_OSX::singleton->is_hidpi_allowed()) {
|
if (OS_OSX::singleton->is_hidpi_allowed()) {
|
||||||
[OS_OSX::singleton->window_view setWantsBestResolutionOpenGLSurface:YES];
|
[OS_OSX::singleton->window_view setWantsBestResolutionOpenGLSurface:YES];
|
||||||
|
} else {
|
||||||
|
[OS_OSX::singleton->window_view setWantsBestResolutionOpenGLSurface:NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newBackingScaleFactor != oldBackingScaleFactor) {
|
if (newBackingScaleFactor != oldBackingScaleFactor) {
|
||||||
|
@ -1342,6 +1344,8 @@ Error OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_a
|
||||||
[window_view setWantsBestResolutionOpenGLSurface:YES];
|
[window_view setWantsBestResolutionOpenGLSurface:YES];
|
||||||
//if (current_videomode.resizable)
|
//if (current_videomode.resizable)
|
||||||
[window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
|
[window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
|
||||||
|
} else {
|
||||||
|
[window_view setWantsBestResolutionOpenGLSurface:NO];
|
||||||
}
|
}
|
||||||
|
|
||||||
//[window_object setTitle:[NSString stringWithUTF8String:"GodotEnginies"]];
|
//[window_object setTitle:[NSString stringWithUTF8String:"GodotEnginies"]];
|
||||||
|
|
Loading…
Reference in New Issue