src/video/cocoa/SDL_cocoametalview.m
changeset 13029 3e281c2da43a
parent 12998 b87ba0fad17e
child 13113 eab802de5fbb
     1.1 --- a/src/video/cocoa/SDL_cocoametalview.m	Thu Aug 22 10:15:33 2019 +0200
     1.2 +++ b/src/video/cocoa/SDL_cocoametalview.m	Thu Aug 22 19:23:52 2019 -0300
     1.3 @@ -77,8 +77,8 @@
     1.4  - (void)updateDrawableSize
     1.5  {
     1.6      CAMetalLayer *metalLayer = (CAMetalLayer *)self.layer;
     1.7 -    CGSize size = self.bounds.size;
     1.8 -    CGSize backingSize = size;
     1.9 +    NSSize size = self.bounds.size;
    1.10 +    NSSize backingSize = size;
    1.11  
    1.12      if (self.highDPI) {
    1.13          /* Note: NSHighResolutionCapable must be set to true in the app's
    1.14 @@ -88,7 +88,7 @@
    1.15      }
    1.16  
    1.17      metalLayer.contentsScale = backingSize.height / size.height;
    1.18 -    metalLayer.drawableSize = backingSize;
    1.19 +    metalLayer.drawableSize = NSSizeToCGSize(backingSize);
    1.20  }
    1.21  
    1.22  /* Set the size of the metal drawables when the view is resized. */