disable gyro mode selector when it's unable to perform in-stream hot switch
This commit is contained in:
@@ -21,6 +21,8 @@
|
||||
|
||||
@interface ControllerSupport : NSObject
|
||||
|
||||
@property (readonly) bool shallDisableGyroHotSwitch;
|
||||
|
||||
-(id) initWithConfig:(StreamConfiguration*)streamConfig delegate:(id<ControllerSupportDelegate>)delegate;
|
||||
-(void) connectionEstablished;
|
||||
|
||||
|
||||
@@ -25,6 +25,13 @@
|
||||
|
||||
static const double MOUSE_SPEED_DIVISOR = 1.25;
|
||||
|
||||
@interface ControllerSupport()
|
||||
|
||||
@property (assign,nonatomic) bool shallDisableGyroHotSwitch;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation ControllerSupport {
|
||||
id _controllerConnectObserver;
|
||||
id _controllerDisconnectObserver;
|
||||
@@ -1388,7 +1395,6 @@ static const double MOUSE_SPEED_DIVISOR = 1.25;
|
||||
_activeGCControllers = [[NSMutableSet alloc] init];
|
||||
_controllerNumbers = 0;
|
||||
|
||||
|
||||
_captureMouse = (streamConfig.localMousePointerMode == 0);
|
||||
if (@available(iOS 14.0, tvOS 14.0, *)) {
|
||||
for (GCMouse* mouse in [GCMouse mice]) {
|
||||
@@ -1538,8 +1544,8 @@ static const double MOUSE_SPEED_DIVISOR = 1.25;
|
||||
|
||||
[self assignControllers];
|
||||
|
||||
//[self updateConfig:streamConfig delegate:delegate];
|
||||
|
||||
_shallDisableGyroHotSwitch = streamConfig.gyroMode == GyroModeOff && _voidControllers.allValues.count == 0;
|
||||
NSLog(@"shallDisableGyroHotSwitch %d", _shallDisableGyroHotSwitch);
|
||||
|
||||
return self;
|
||||
}
|
||||
@@ -1551,6 +1557,7 @@ static const double MOUSE_SPEED_DIVISOR = 1.25;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
-(void)connectionEstablished {
|
||||
for (VoidController* voidController in _voidControllers.allValues) {
|
||||
[self updateFinished:voidController];
|
||||
|
||||
@@ -1135,10 +1135,12 @@ static NSMutableSet* hostList;
|
||||
[settingsViewController.codecSelector setEnabled:!_settingsExpandedInStreamView];
|
||||
[settingsViewController.yuv444Switch setEnabled:!_settingsExpandedInStreamView];
|
||||
[settingsViewController.hdrSwitch setEnabled:!_settingsExpandedInStreamView];
|
||||
[settingsViewController.gyroModeSelector setEnabled:!_settingsExpandedInStreamView || ![streamFrameViewController shallDisableGyroHotSwitch]];
|
||||
[settingsViewController setHidden:_settingsExpandedInStreamView forStack:settingsViewController.framepacingStack];
|
||||
[settingsViewController setHidden:_settingsExpandedInStreamView forStack:settingsViewController.citrixX1MouseStack];
|
||||
[settingsViewController setHidden:_settingsExpandedInStreamView forStack:settingsViewController.externalDisplayModeStack];
|
||||
[settingsViewController setHidden:_settingsExpandedInStreamView forStack:settingsViewController.audioConfigStack];
|
||||
|
||||
}
|
||||
|
||||
- (void)revealController:(SWRevealViewController *)revealController didMoveToPosition:(FrontViewPosition)position {
|
||||
|
||||
@@ -32,5 +32,6 @@
|
||||
-(void)updatePreferredDisplayMode:(BOOL)streamActive;
|
||||
-(void)reConfigStreamViewRealtime;
|
||||
- (void)setUserInteractionEnabledForStreamView:(bool)enabled;
|
||||
- (bool)shallDisableGyroHotSwitch;
|
||||
|
||||
@end
|
||||
|
||||
@@ -670,6 +670,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (bool)shallDisableGyroHotSwitch{
|
||||
return _controllerSupport.shallDisableGyroHotSwitch;
|
||||
}
|
||||
|
||||
- (BOOL) isAirPlaying{
|
||||
return _extWindow != nil && _extWindow.hidden == NO;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user