From 1de43bfb49dd8b17066fc3f5f86e6d7488a92465 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Fri, 12 Apr 2024 19:11:07 +0800 Subject: [PATCH] Update rcore_ios.c --- src/platforms/rcore_ios.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/platforms/rcore_ios.c b/src/platforms/rcore_ios.c index 59c5437c8144..c067bfdcaca7 100644 --- a/src/platforms/rcore_ios.c +++ b/src/platforms/rcore_ios.c @@ -549,6 +549,15 @@ int InitPlatform(void) } else { + CORE.Window.display.width = [[UIScreen mainScreen] nativeBounds].size.width; + CORE.Window.display.height = [[UIScreen mainScreen] nativeBounds].size.height; + if(CORE.Window.screen.width == 0){ + CORE.Window.screen.width = [[UIScreen mainScreen] bounds].size.width; + } + if(CORE.Window.screen.height == 0){ + CORE.Window.screen.height = [[UIScreen mainScreen] bounds].size.height; + } + CORE.Window.render.width = CORE.Window.screen.width; CORE.Window.render.height = CORE.Window.screen.height; CORE.Window.currentFbo.width = CORE.Window.render.width;