change allowPortrait to unlockDisplayOrientationInStreaming
This commit is contained in:
1 parent
592b7acfc4
commit
8506640d7f
13 files changed
+49
-48
No files matched your search
@@ -952,7 +952,7 @@ static NSMutableSet* hostList;
|
||||
[settingsViewController.btMouseSelector setEnabled:!self.settingsExpandedInStreamView];
|
||||
[settingsViewController.externalDisplayModeSelector setEnabled:!self.settingsExpandedInStreamView];
|
||||
[settingsViewController.goBackToStreamViewButton setEnabled:self.settingsExpandedInStreamView];
|
||||
[settingsViewController.allowPortraitSelector setEnabled:!self.settingsExpandedInStreamView && [self isFullScreenRequired]];//need "requires fullscreen" enabled in the app bunddle to make runtime orientation limitation woring
|
||||
// [settingsViewController.unlockDisplayOrientationSelector setEnabled:!self.settingsExpandedInStreamView && [self isFullScreenRequired]];//need "requires fullscreen" enabled in the app bunddle to make runtime orientation limitation woring
|
||||
|
||||
if (position == FrontViewPositionLeft) {
|
||||
[settingsViewController saveSettings];
|
||||
|
||||
@@ -737,12 +737,13 @@ const int FrontViewPositionNone = 0xff;
|
||||
//lock the orientation accordingly after streaming is started
|
||||
DataManager* dataMan = [[DataManager alloc] init];
|
||||
Settings *currentSettings = [dataMan retrieveSettings];
|
||||
//Handle allow portrait on & off
|
||||
if(currentSettings.allowPortrait){
|
||||
if (self.isStreaming || self.mainFrameIsInHostView) return [self getCurrentOrientation]; //orientation change is not allowed in streaming or mainframe host view
|
||||
else return UIInterfaceOrientationMaskAll;
|
||||
//Handle Lock Display Orientation on & off
|
||||
|
||||
if(self.mainFrameIsInHostView) return [self getCurrentOrientation]; //always try to lock orientaion in mainFrameView in order to prevent bug.
|
||||
if(currentSettings.unlockDisplayOrientation){
|
||||
return UIInterfaceOrientationMaskAll; // 90 Degree rotation will be allowed in streaming
|
||||
}
|
||||
else return UIInterfaceOrientationMaskLandscape;
|
||||
else return [self getCurrentOrientation];
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
@property (strong, nonatomic) IBOutlet UILabel *touchPointerVelocityFactorUILabel;
|
||||
@property (strong, nonatomic) IBOutlet UISlider *mousePointerVelocityFactorSlider;
|
||||
@property (strong, nonatomic) IBOutlet UILabel *mousePointerVelocityFactorUILabel;
|
||||
@property (strong, nonatomic) IBOutlet UISegmentedControl *allowPortraitSelector;
|
||||
@property (strong, nonatomic) IBOutlet UISegmentedControl *unlockDisplayOrientationSelector;
|
||||
@property (strong, nonatomic) IBOutlet UIButton *goBackToStreamViewButton;
|
||||
@property (strong, nonatomic) LayoutOnScreenControlsViewController *layoutOnScreenControlsVC;
|
||||
@property (nonatomic, strong) MainFrameViewController *mainFrameViewController;
|
||||
|
||||
@@ -471,11 +471,11 @@ BOOL isCustomResolution(CGSize res) {
|
||||
[self updateBitrateText];
|
||||
[self updateResolutionDisplayViewText];
|
||||
|
||||
// allow portrait setting
|
||||
bool allowPortraitSelectorEnabled = [self isFullScreenRequired];//need "requires fullscreen" enabled in the app bunddle to make runtime orientation limitation woring
|
||||
if(allowPortraitSelectorEnabled) [self.allowPortraitSelector setSelectedSegmentIndex:currentSettings.allowPortrait ? 1 : 0];
|
||||
else [self.allowPortraitSelector setSelectedSegmentIndex:1]; // can't lock screen orientation in this mode = always allow portrait mode
|
||||
[self.allowPortraitSelector setEnabled:allowPortraitSelectorEnabled];
|
||||
// Lock Display Orientation setting
|
||||
bool unlockDisplayOrientationSelectorEnabled = [self isFullScreenRequired];//need "requires fullscreen" enabled in the app bunddle to make runtime orientation limitation woring
|
||||
if(unlockDisplayOrientationSelectorEnabled) [self.unlockDisplayOrientationSelector setSelectedSegmentIndex:currentSettings.unlockDisplayOrientation ? 1 : 0];
|
||||
else [self.unlockDisplayOrientationSelector setSelectedSegmentIndex:1]; // can't lock screen orientation in this mode = always Lock Display Orientation mode
|
||||
[self.unlockDisplayOrientationSelector setEnabled:unlockDisplayOrientationSelectorEnabled];
|
||||
|
||||
|
||||
// lift streamview setting
|
||||
@@ -1065,7 +1065,7 @@ BOOL isCustomResolution(CGSize res) {
|
||||
NSInteger touchMode = [self.touchModeSelector selectedSegmentIndex];
|
||||
BOOL statsOverlay = [self.statsOverlaySelector selectedSegmentIndex] == 1;
|
||||
BOOL enableHdr = [self.hdrSelector selectedSegmentIndex] == 1;
|
||||
BOOL allowPortrait = [self.allowPortraitSelector selectedSegmentIndex] == 1;
|
||||
BOOL unlockDisplayOrientation = [self.unlockDisplayOrientationSelector selectedSegmentIndex] == 1;
|
||||
NSInteger resolutionSelected = [self.resolutionSelector selectedSegmentIndex];
|
||||
NSInteger externalDisplayMode = [self.externalDisplayModeSelector selectedSegmentIndex];
|
||||
NSInteger localMousePointerMode = [self.localMousePointerModeSelector selectedSegmentIndex];
|
||||
@@ -1098,7 +1098,7 @@ BOOL isCustomResolution(CGSize res) {
|
||||
// absoluteTouchMode:absoluteTouchMode
|
||||
touchMode:touchMode
|
||||
statsOverlay:statsOverlay
|
||||
allowPortrait:allowPortrait
|
||||
unlockDisplayOrientation:unlockDisplayOrientation
|
||||
resolutionSelected:resolutionSelected
|
||||
externalDisplayMode:externalDisplayMode
|
||||
localMousePointerMode:localMousePointerMode];
|
||||
|
||||
Reference in new issue
Block a user