mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
metal: contrary to documentation, we need to set the drawableSize explicitly.
Fixes Bugzilla #4149.
This commit is contained in:
parent
8325df25aa
commit
3d3870982c
@ -66,11 +66,10 @@
|
||||
/* Allow resize. */
|
||||
self.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
||||
|
||||
/* Set the desired scale. The default drawableSize of a CAMetalLayer
|
||||
* is its bounds x its scale so nothing further needs to be done.
|
||||
*/
|
||||
/* Set the desired scale. */
|
||||
((CAMetalLayer *) self.layer).drawableSize = NSSizeToCGSize([self bounds].size);
|
||||
self.layer.contentsScale = scale;
|
||||
}
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
@ -49,8 +49,8 @@
|
||||
{
|
||||
if ((self = [super initWithFrame:frame])) {
|
||||
self.tag = METALVIEW_TAG;
|
||||
/* Set the desired scale. The default drawableSize of a CAMetalLayer
|
||||
* is its bounds x its scale so nothing further needs to be done. */
|
||||
/* Set the desired scale. */
|
||||
((CAMetalLayer *) self.layer).drawableSize = self.bounds.size;
|
||||
self.layer.contentsScale = scale;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user