From 51e915b5986c8ccaf58301bdc53e078abd947170 Mon Sep 17 00:00:00 2001 From: TrueZhuanjia Date: Thu, 10 Jul 2025 22:29:28 +0800 Subject: [PATCH] disable unlockorientationSelector when it's iPad + requiresFulscreen disabled --- VoidLink/ViewControllers/SettingsViewController.m | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/VoidLink/ViewControllers/SettingsViewController.m b/VoidLink/ViewControllers/SettingsViewController.m index 66f76d29..b6c721a9 100644 --- a/VoidLink/ViewControllers/SettingsViewController.m +++ b/VoidLink/ViewControllers/SettingsViewController.m @@ -1293,8 +1293,7 @@ BOOL isCustomResolution(CGSize res) { } // Unlock Display Orientation setting - // bool unlockDisplayOrientationSelectorEnabled = [self isFullScreenRequired];//need "requires fullscreen" enabled in the app bunddle to make runtime orientation limitation woring - bool unlockDisplayOrientationSelectorEnabled = true; + bool unlockDisplayOrientationSelectorEnabled = [self isFullScreenRequired] || [self isIPhone];//need "requires fullscreen" enabled in the app bunddle to make runtime orientation limitation working if(unlockDisplayOrientationSelectorEnabled) [self.unlockDisplayOrientationSelector setSelectedSegmentIndex:currentSettings.unlockDisplayOrientation ? 1 : 0]; else [self.unlockDisplayOrientationSelector setSelectedSegmentIndex:1]; // can't lock screen orientation in this mode = Display Orientation always unlocked [self.unlockDisplayOrientationSelector setEnabled:unlockDisplayOrientationSelectorEnabled]; @@ -1445,8 +1444,6 @@ BOOL isCustomResolution(CGSize res) { [self presentViewController:alertController animated:YES completion:nil]; } - - - (bool)isOswEnabled{ return [self isNotNativeTouchOnly] && self.onScreenWidgetSelector.selectedSegmentIndex != OnScreenControlsLevelOff; }