diff options
author | ageazrael <ageazrael@gmail.com> | 2017-06-13 09:54:55 +0800 |
---|---|---|
committer | ageazrael <ageazrael@gmail.com> | 2017-06-13 09:54:55 +0800 |
commit | 109ad227d3e85105ae6ac3f8a289580458adf1f9 (patch) | |
tree | 19ebf388db6e62b07c80004bae25d91206612475 /platform/osx | |
parent | b3accab62d9ef04694fcc8b60a93fe3cfec79325 (diff) |
Used in the macOS HiDPI options window is too small
Diffstat (limited to 'platform/osx')
-rw-r--r-- | platform/osx/os_osx.mm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 5ca4318fa7..1070de724b 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -816,7 +816,7 @@ void OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_au unsigned int styleMask = NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | (p_desired.resizable ? NSResizableWindowMask : 0); window_object = [[GodotWindow alloc] - initWithContentRect:NSMakeRect(0, 0, p_desired.width / display_scale, p_desired.height / display_scale) + initWithContentRect:NSMakeRect(0, 0, p_desired.width, p_desired.height) styleMask:styleMask backing:NSBackingStoreBuffered defer:NO]; @@ -825,8 +825,8 @@ void OS_OSX::initialize(const VideoMode &p_desired, int p_video_driver, int p_au window_view = [[GodotContentView alloc] init]; - window_size.width = p_desired.width; - window_size.height = p_desired.height; + window_size.width = p_desired.width * display_scale; + window_size.height = p_desired.height * display_scale; if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6 && display_scale > 1) { [window_view setWantsBestResolutionOpenGLSurface:YES]; |