Skip to content

Commit

Permalink
Merge pull request godotengine#32809 from bruvzg/macos_1015_non_hidpi…
Browse files Browse the repository at this point in the history
…_fix

Fix non-HiDPI mode on HiDPI displays on macOS Catalina.
  • Loading branch information
akien-mga authored Oct 13, 2019
2 parents d062818 + 509afce commit 1fed266
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions platform/osx/os_osx.mm
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ - (void)windowDidChangeBackingProperties:(NSNotification *)notification {
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) {
Expand Down Expand Up @@ -1492,6 +1494,8 @@ static void displays_arrangement_changed(CGDirectDisplayID display_id, CGDisplay
[window_view setWantsBestResolutionOpenGLSurface:YES];
//if (current_videomode.resizable)
[window_object setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary];
} else {
[window_view setWantsBestResolutionOpenGLSurface:NO];
}

//[window_object setTitle:[NSString stringWithUTF8String:"GodotEnginies"]];
Expand Down

0 comments on commit 1fed266

Please sign in to comment.