From f10818b243e30fafc087a140323fa901f76224e4 Mon Sep 17 00:00:00 2001 From: Eric Warmenhoven Date: Mon, 7 Jul 2025 22:02:45 -0400 Subject: [PATCH] ios: fix iphone landscape rendering --- ui/drivers/cocoa/cocoa_common.m | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/ui/drivers/cocoa/cocoa_common.m b/ui/drivers/cocoa/cocoa_common.m index c91dda8154..3d81672acc 100644 --- a/ui/drivers/cocoa/cocoa_common.m +++ b/ui/drivers/cocoa/cocoa_common.m @@ -592,14 +592,23 @@ void rarch_stop_draw_observer(void) return; CGRect screenSize = [screen bounds]; - CGRect currentBounds = self.view.bounds; - bool isMultitasking = (currentBounds.size.width < screenSize.size.width || - currentBounds.size.height < screenSize.size.height); + if (ios_running_on_ipad()) + { + CGRect currentBounds = self.view.bounds; + bool isMultitasking = (currentBounds.size.width < screenSize.size.width || + currentBounds.size.height < screenSize.size.height); - /* In multitasking mode, don't override the frame - let iOS handle it */ - if (isMultitasking) + /* In multitasking mode, don't override the frame - let iOS handle it */ + if (isMultitasking) + return; + } + + if (settings->bools.video_notch_write_over_enable) + { + self.view.frame = screenSize; return; + } /* Only apply safe area adjustments when in full screen mode */ UIWindow *window = [[UIApplication sharedApplication] delegate].window; @@ -609,12 +618,6 @@ void rarch_stop_draw_observer(void) UIEdgeInsets inset = window.safeAreaInsets; UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation]; - if (settings->bools.video_notch_write_over_enable) - { - self.view.frame = screenSize; - return; - } - switch (orientation) { case UIInterfaceOrientationPortrait: