Add a settings option for enabling Citrix X1 support

This commit is contained in:
Cameron Gutman
2020-03-27 20:26:01 -07:00
parent 75ab28a2c3
commit 6d03f4bc4c
14 changed files with 117 additions and 8 deletions

View File

@@ -54,6 +54,9 @@
- (void) setupStreamView:(ControllerSupport*)controllerSupport swipeDelegate:(id<EdgeDetectionDelegate>)swipeDelegate interactionDelegate:(id<UserInteractionDelegate>)interactionDelegate {
self->interactionDelegate = interactionDelegate;
TemporarySettings* settings = [[[DataManager alloc] init] getSettings];
#if TARGET_OS_TV
remotePressRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(remoteButtonPressed:)];
remotePressRecognizer.allowedPressTypes = @[@(UIPressTypeSelect)];
@@ -65,8 +68,7 @@
[self addGestureRecognizer:remoteLongPressRecognizer];
#else
onScreenControls = [[OnScreenControls alloc] initWithView:self controllerSup:controllerSupport swipeDelegate:swipeDelegate];
DataManager* dataMan = [[DataManager alloc] init];
OnScreenControlsLevel level = (OnScreenControlsLevel)[[dataMan getSettings].onscreenControls integerValue];
OnScreenControlsLevel level = (OnScreenControlsLevel)[settings.onscreenControls integerValue];
if (level == OnScreenControlsLevelAuto) {
[controllerSupport initAutoOnScreenControlMode:onScreenControls];
}
@@ -80,7 +82,10 @@
x1mouse = [[X1Mouse alloc] init];
x1mouse.delegate = self;
[x1mouse start];
if (settings.btMouseSupport) {
[x1mouse start];
}
}
- (void)startInteractionTimer {