mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 18:32:44 +00:00
iOS: Fix CAMetalLayer nativeScale confusion (#17225)
This commit is contained in:
parent
6475791e07
commit
4d335c4855
@ -131,8 +131,7 @@ static void cocoa_vk_gfx_ctx_get_video_size(void *data,
|
||||
unsigned* width, unsigned* height)
|
||||
{
|
||||
float screenscale = cocoa_screen_get_native_scale();
|
||||
MTKView *g_view = apple_platform.renderView;
|
||||
CGRect size = g_view.bounds;
|
||||
CGRect size = [apple_platform.renderView bounds];
|
||||
*width = CGRectGetWidth(size) * screenscale;
|
||||
*height = CGRectGetHeight(size) * screenscale;
|
||||
}
|
||||
|
@ -527,7 +527,7 @@ enum
|
||||
|
||||
- (void)setupMetalLayer {
|
||||
self.metalLayer.device = MTLCreateSystemDefaultDevice();
|
||||
self.metalLayer.contentsScale = [UIScreen mainScreen].scale;
|
||||
self.metalLayer.contentsScale = [UIScreen mainScreen].nativeScale;
|
||||
self.metalLayer.opaque = YES;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user