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