src/video/cocoa/SDL_cocoametalview.m
changeset 12002 9116d02d3feb
parent 11886 27d81cb6e6af
child 12201 8bdc4d340419
     1.1 --- a/src/video/cocoa/SDL_cocoametalview.m	Thu May 24 07:30:24 2018 -0700
     1.2 +++ b/src/video/cocoa/SDL_cocoametalview.m	Sun May 27 20:30:03 2018 -0400
     1.3 @@ -66,11 +66,10 @@
     1.4          /* Allow resize. */
     1.5          self.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
     1.6  
     1.7 -        /* Set the desired scale. The default drawableSize of a CAMetalLayer
     1.8 -         * is its bounds x its scale so nothing further needs to be done.
     1.9 -         */
    1.10 +        /* Set the desired scale. */
    1.11 +        ((CAMetalLayer *) self.layer).drawableSize = NSSizeToCGSize([self bounds].size);
    1.12          self.layer.contentsScale = scale;
    1.13 -	}
    1.14 +    }
    1.15    
    1.16  	return self;
    1.17  }