From fc27e46af443e222804ef1648d657ea32166653f Mon Sep 17 00:00:00 2001 From: ageazrael Date: Tue, 13 Jun 2017 09:54:55 +0800 Subject: [PATCH] Used in the macOS HiDPI options window is too small (cherry picked from commit 109ad227d3e85105ae6ac3f8a289580458adf1f9) --- platform/osx/os_osx.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index cc68db9ff94..26f3da33c01 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -910,7 +910,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]; @@ -919,8 +919,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 MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6 && display_scale > 1) {