src/video/cocoa/SDL_cocoametalview.m
changeset 12002 9116d02d3feb
parent 11886 27d81cb6e6af
child 12201 8bdc4d340419
equal deleted inserted replaced
12001:84c2582329b0 12002:9116d02d3feb
    64         self.wantsLayer = YES;
    64         self.wantsLayer = YES;
    65 
    65 
    66         /* Allow resize. */
    66         /* Allow resize. */
    67         self.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
    67         self.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
    68 
    68 
    69         /* Set the desired scale. The default drawableSize of a CAMetalLayer
    69         /* Set the desired scale. */
    70          * is its bounds x its scale so nothing further needs to be done.
    70         ((CAMetalLayer *) self.layer).drawableSize = NSSizeToCGSize([self bounds].size);
    71          */
       
    72         self.layer.contentsScale = scale;
    71         self.layer.contentsScale = scale;
    73 	}
    72     }
    74   
    73   
    75 	return self;
    74 	return self;
    76 }
    75 }
    77 
    76 
    78 /* Set the size of the metal drawables when the view is resized. */
    77 /* Set the size of the metal drawables when the view is resized. */