diff --git a/Limelight/Base.lproj/iPad.storyboard b/Limelight/Base.lproj/iPad.storyboard index 4bf8c776..330c674f 100644 --- a/Limelight/Base.lproj/iPad.storyboard +++ b/Limelight/Base.lproj/iPad.storyboard @@ -454,14 +454,14 @@ ICAgICAgICAgICAgICA - - + @@ -573,7 +573,7 @@ ICAgICAgICAgICAgICA - + @@ -588,7 +588,6 @@ ICAgICAgICAgICAgICA - @@ -630,6 +629,7 @@ ICAgICAgICAgICAgICA + diff --git a/Limelight/Base.lproj/iPhone.storyboard b/Limelight/Base.lproj/iPhone.storyboard index bc5638ac..c1177644 100644 --- a/Limelight/Base.lproj/iPhone.storyboard +++ b/Limelight/Base.lproj/iPhone.storyboard @@ -529,14 +529,14 @@ ICAgICAgICAgICAgIA - - + @@ -589,7 +589,7 @@ ICAgICAgICAgICAgIA - + @@ -604,7 +604,6 @@ ICAgICAgICAgICAgIA - @@ -646,11 +645,12 @@ ICAgICAgICAgICAgIA + - + diff --git a/Limelight/Database/DataManager.h b/Limelight/Database/DataManager.h index ea8956de..b852b5cc 100644 --- a/Limelight/Database/DataManager.h +++ b/Limelight/Database/DataManager.h @@ -42,7 +42,7 @@ // absoluteTouchMode:(BOOL)absoluteTouchMode touchMode:(NSInteger)touchMode statsOverlay:(BOOL)statsOverlay - allowPortrait:(BOOL)allowPortrait + unlockDisplayOrientation:(BOOL)unlockDisplayOrientation resolutionSelected:(NSInteger)resolutionSelected externalDisplayMode:(NSInteger)externalDisplayMode localMousePointerMode:(NSInteger)localMousePointerMode; diff --git a/Limelight/Database/DataManager.m b/Limelight/Database/DataManager.m index 299ca947..8fa7f0e2 100644 --- a/Limelight/Database/DataManager.m +++ b/Limelight/Database/DataManager.m @@ -81,7 +81,7 @@ // absoluteTouchMode:(BOOL)absoluteTouchMode touchMode:(NSInteger)touchMode statsOverlay:(BOOL)statsOverlay - allowPortrait:(BOOL)allowPortrait + unlockDisplayOrientation:(BOOL)unlockDisplayOrientation resolutionSelected:(NSInteger)resolutionSelected externalDisplayMode:(NSInteger)externalDisplayMode localMousePointerMode:(NSInteger)localMousePointerMode { @@ -117,7 +117,7 @@ // settingsToSave.absoluteTouchMode = absoluteTouchMode; settingsToSave.touchMode = [NSNumber numberWithInteger:(uint16_t)touchMode]; settingsToSave.statsOverlay = statsOverlay; - settingsToSave.allowPortrait = allowPortrait; + settingsToSave.unlockDisplayOrientation = unlockDisplayOrientation; settingsToSave.resolutionSelected = [NSNumber numberWithInteger:resolutionSelected]; settingsToSave.externalDisplayMode = [NSNumber numberWithInteger:externalDisplayMode]; settingsToSave.localMousePointerMode = [NSNumber numberWithInteger:localMousePointerMode]; diff --git a/Limelight/Database/TemporarySettings.h b/Limelight/Database/TemporarySettings.h index 76b30ac9..d0cc6da9 100644 --- a/Limelight/Database/TemporarySettings.h +++ b/Limelight/Database/TemporarySettings.h @@ -56,7 +56,7 @@ @property (nonatomic) BOOL statsOverlay; @property (nonatomic) BOOL liftStreamViewForKeyboard; @property (nonatomic) BOOL showKeyboardToolbar; -@property (nonatomic) BOOL allowPortrait; +@property (nonatomic) BOOL unlockDisplayOrientation; - (id) initFromSettings:(Settings*)settings; diff --git a/Limelight/Database/TemporarySettings.m b/Limelight/Database/TemporarySettings.m index 832d6bd5..87e010c5 100644 --- a/Limelight/Database/TemporarySettings.m +++ b/Limelight/Database/TemporarySettings.m @@ -98,7 +98,7 @@ self.touchPointerVelocityFactor = settings.touchPointerVelocityFactor; self.mousePointerVelocityFactor = settings.mousePointerVelocityFactor; self.pointerVelocityModeDivider = settings.pointerVelocityModeDivider; - self.allowPortrait = settings.allowPortrait; + self.unlockDisplayOrientation = settings.unlockDisplayOrientation; self.resolutionSelected = settings.resolutionSelected; self.externalDisplayMode = settings.externalDisplayMode; self.localMousePointerMode = settings.localMousePointerMode; diff --git a/Limelight/Limelight.xcdatamodeld/Moonlight v1.10.xcdatamodel/contents b/Limelight/Limelight.xcdatamodeld/Moonlight v1.10.xcdatamodel/contents index 8c92e61e..9776262a 100644 --- a/Limelight/Limelight.xcdatamodeld/Moonlight v1.10.xcdatamodel/contents +++ b/Limelight/Limelight.xcdatamodeld/Moonlight v1.10.xcdatamodel/contents @@ -21,7 +21,6 @@ - @@ -53,6 +52,7 @@ + diff --git a/Limelight/ViewControllers/MainFrameViewController.m b/Limelight/ViewControllers/MainFrameViewController.m index 8887e147..3ef82566 100644 --- a/Limelight/ViewControllers/MainFrameViewController.m +++ b/Limelight/ViewControllers/MainFrameViewController.m @@ -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]; diff --git a/Limelight/ViewControllers/SWRevealViewController.m b/Limelight/ViewControllers/SWRevealViewController.m index 39757a60..4b218798 100755 --- a/Limelight/ViewControllers/SWRevealViewController.m +++ b/Limelight/ViewControllers/SWRevealViewController.m @@ -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]; } diff --git a/Limelight/ViewControllers/SettingsViewController.h b/Limelight/ViewControllers/SettingsViewController.h index c046ccd7..6f9affbf 100644 --- a/Limelight/ViewControllers/SettingsViewController.h +++ b/Limelight/ViewControllers/SettingsViewController.h @@ -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; diff --git a/Limelight/ViewControllers/SettingsViewController.m b/Limelight/ViewControllers/SettingsViewController.m index cea7008b..287229a9 100644 --- a/Limelight/ViewControllers/SettingsViewController.m +++ b/Limelight/ViewControllers/SettingsViewController.m @@ -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]; diff --git a/Limelight/mul.lproj/iPad.xcstrings b/Limelight/mul.lproj/iPad.xcstrings index fa62bc5f..c058ed7b 100644 --- a/Limelight/mul.lproj/iPad.xcstrings +++ b/Limelight/mul.lproj/iPad.xcstrings @@ -1142,31 +1142,31 @@ } }, "hAo-1k-oYF.text" : { - "comment" : "Class = \"UILabel\"; text = \"Allow Portrait (Orientation Changes in App View Only) \"; ObjectID = \"hAo-1k-oYF\";", + "comment" : "Class = \"UILabel\"; text = \"Allow 90° Display Rotation in Steaming\"; ObjectID = \"hAo-1k-oYF\";", "extractionState" : "extracted_with_value", "localizations" : { "en" : { "stringUnit" : { "state" : "new", - "value" : "Allow Portrait (Orientation Changes in App View Only) " + "value" : "Allow 90° Display Rotation in Steaming" } }, "zh-Hans" : { "stringUnit" : { - "state" : "needs_review", - "value" : "允许竖屏 (启用后只允许在应用视图中90度转屏)" + "state" : "translated", + "value" : "串流中允许90°转屏" } }, "zh-Hant" : { "stringUnit" : { - "state" : "needs_review", - "value" : "允许竖屏 (启用后只允许在应用视图中90度转屏)" + "state" : "translated", + "value" : "串流中允许90°转屏" } }, "zh-HK" : { "stringUnit" : { - "state" : "needs_review", - "value" : "允许竖屏 (启用后只允许在应用视图中90度转屏)" + "state" : "translated", + "value" : "串流中允许90°转屏" } } } diff --git a/Limelight/mul.lproj/iPhone.xcstrings b/Limelight/mul.lproj/iPhone.xcstrings index 6b064ecd..0c5a4d50 100644 --- a/Limelight/mul.lproj/iPhone.xcstrings +++ b/Limelight/mul.lproj/iPhone.xcstrings @@ -2582,31 +2582,31 @@ } }, "Z9P-TN-kci.text" : { - "comment" : "Class = \"UILabel\"; text = \"Allow Portrait (Orientation Changes in App View Only)\"; ObjectID = \"Z9P-TN-kci\";", + "comment" : "Class = \"UILabel\"; text = \"Allow 90° Display Rotation in Steaming\"; ObjectID = \"Z9P-TN-kci\";", "extractionState" : "extracted_with_value", "localizations" : { "en" : { "stringUnit" : { "state" : "new", - "value" : "Allow Portrait (Orientation Changes in App View Only)" + "value" : "Allow 90° Display Rotation in Steaming" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "允许竖屏 (启用后只允许在应用视图中90度转屏)" + "value" : "串流中允许90°转屏" } }, "zh-Hant" : { "stringUnit" : { "state" : "translated", - "value" : "允许竖屏 (启用后只允许在应用视图中90度转屏)" + "value" : "串流中允许90°转屏" } }, "zh-HK" : { "stringUnit" : { "state" : "translated", - "value" : "允许竖屏 (启用后只允许在应用视图中90度转屏)" + "value" : "串流中允许90°转屏" } } }