disallow orientation change in mainframe host view (need iOS16+)

This commit is contained in:
True Zhuanjia
2024-07-20 19:40:49 +08:00
parent 2bcdd25cc2
commit 033265d58e
3 changed files with 9 additions and 1 deletions
@@ -739,7 +739,7 @@ const int FrontViewPositionNone = 0xff;
Settings *currentSettings = [dataMan retrieveSettings];
//Handle allow portrait on & off
if(currentSettings.allowPortrait){
if (self.isStreaming) return [self getCurrentOrientation];
if (self.isStreaming || self.mainFrameIsInHostView) return [self getCurrentOrientation]; //orientation change is not allowed in streaming or mainframe host view
else return UIInterfaceOrientationMaskAll;
}
else return UIInterfaceOrientationMaskLandscape;