From dd29abb4789b1612a994ebdef039aa4daf3cdb6d Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Thu, 22 Aug 2019 19:23:52 -0300 Subject: [PATCH] macOS: Use the proper type (NSSize instead of CGSize) for the bounds of metal views. --- src/video/cocoa/SDL_cocoametalview.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/video/cocoa/SDL_cocoametalview.m b/src/video/cocoa/SDL_cocoametalview.m index b3b8b8434..4eea8d1bc 100644 --- a/src/video/cocoa/SDL_cocoametalview.m +++ b/src/video/cocoa/SDL_cocoametalview.m @@ -77,8 +77,8 @@ - (void)updateDrawableSize { CAMetalLayer *metalLayer = (CAMetalLayer *)self.layer; - CGSize size = self.bounds.size; - CGSize backingSize = size; + NSSize size = self.bounds.size; + NSSize backingSize = size; if (self.highDPI) { /* Note: NSHighResolutionCapable must be set to true in the app's @@ -88,7 +88,7 @@ } metalLayer.contentsScale = backingSize.height / size.height; - metalLayer.drawableSize = backingSize; + metalLayer.drawableSize = NSSizeToCGSize(backingSize); } /* Set the size of the metal drawables when the view is resized. */