deprecate NativeTouchOnly mode
This commit is contained in:
@@ -125,6 +125,8 @@
|
||||
self.controllerGyroSwitchToggle = [decoder containsValueForKey:@"controllerGyroSwitchToggle"] ? [decoder decodeIntForKey:@"controllerGyroSwitchToggle"] : ControllerButtonNull;
|
||||
|
||||
self.touchMode = [decoder containsValueForKey:@"touchMode"] ? [decoder decodeIntForKey:@"touchMode"] : NativeTouch;
|
||||
if(self.touchMode == NativeTouchOnly) self.touchMode = NativeTouch;
|
||||
|
||||
self.pointerVelocityModeDivider = [decoder containsValueForKey:@"pointerVelocityModeDivider"] ? [decoder decodeFloatForKey:@"pointerVelocityModeDivider"] : 0.5;
|
||||
self.touchPointerVelocityFactor = [decoder containsValueForKey:@"touchPointerVelocityFactor"] ? [decoder decodeFloatForKey:@"touchPointerVelocityFactor"] : 1.0;
|
||||
|
||||
|
||||
@@ -562,15 +562,9 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// we'll enable on screen buttons, and disable on screen controllers for absolute touch
|
||||
- (bool) isOscEnabled{
|
||||
return (touchMode == RelativeTouch || touchMode == NativeTouch || touchMode == AbsoluteTouch || touchMode == TouchDisabled) && settings.onscreenControls.intValue != OnScreenControlsLevelOff;
|
||||
}
|
||||
|
||||
// we'll enable on screen buttons, and disable on screen controllers for absolute touch
|
||||
- (bool) isOnScreenWidgetEnabled{
|
||||
return [self isOscEnabled] && settings.onscreenControls.intValue == OnScreenControlsLevelCustom;
|
||||
return settings.onscreenControls.intValue == OnScreenControlsLevelCustom;
|
||||
}
|
||||
|
||||
- (void) reloadOnScreenControlsRealtimeWithControllerSupport:(ControllerSupport*)controllerSupport
|
||||
@@ -594,7 +588,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
RelativeTouchHandler* relativeTouchHandler = (RelativeTouchHandler *)touchHandler;
|
||||
onScreenControls.mouseRightClickTapRecognizer = relativeTouchHandler.mouseRightClickTapRecognizer;
|
||||
} */
|
||||
if([self isOscEnabled]) [_onScreenControls setLevel:(OnScreenControlsLevel)settings.onscreenControls.intValue];
|
||||
if([self isOnScreenWidgetEnabled]) [_onScreenControls setLevel:(OnScreenControlsLevel)settings.onscreenControls.intValue];
|
||||
}
|
||||
|
||||
|
||||
@@ -826,7 +820,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
NSLog(@"hasLegacyWidget %d %f", hasLegacyWidget, CACurrentMediaTime());
|
||||
// legacy widgets
|
||||
if(!OnScreenWidgetView.editMode && (hasLegacyWidget || !reloadWidgets)){
|
||||
if([self isOscEnabled]) [self reloadLegacyWidgets:profile];
|
||||
if([self isOnScreenWidgetEnabled]) [self reloadLegacyWidgets:profile];
|
||||
else [self disableOnScreenControls];
|
||||
}
|
||||
|
||||
@@ -1059,8 +1053,8 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
[self startInteractionTimer];
|
||||
|
||||
NSSet* targetTouches = nonPencilTouches ? nonPencilTouches : touches;
|
||||
if(touchMode == NativeTouch || touchMode == RelativeTouch){
|
||||
[self->_onScreenControls handleTouchDownEvent:targetTouches];
|
||||
if(touchMode != AbsoluteTouch){
|
||||
if([self isOnScreenWidgetEnabled]) [self->_onScreenControls handleTouchDownEvent:targetTouches];
|
||||
[self->touchHandler touchesBegan:targetTouches withEvent:event];
|
||||
}
|
||||
else if(![_onScreenControls handleTouchDownEvent:targetTouches]) [touchHandler touchesBegan:targetTouches withEvent:event];
|
||||
@@ -1236,9 +1230,9 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
hasUserInteracted = YES;
|
||||
|
||||
NSSet* targetTouches = nonPencilTouches ? nonPencilTouches : touches;
|
||||
if(self->touchMode == NativeTouch || self->touchMode == RelativeTouch){
|
||||
if(self->touchMode != AbsoluteTouch){
|
||||
[self->touchHandler touchesMoved:targetTouches withEvent:event];
|
||||
[self->_onScreenControls handleTouchMovedEvent:targetTouches];
|
||||
if([self isOnScreenWidgetEnabled]) [self->_onScreenControls handleTouchMovedEvent:targetTouches];
|
||||
}
|
||||
else if(![self->_onScreenControls handleTouchMovedEvent:targetTouches]) [self->touchHandler touchesMoved:targetTouches withEvent:event];
|
||||
}
|
||||
@@ -1388,9 +1382,9 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
hasUserInteracted = YES;
|
||||
|
||||
NSSet* targetTouches = nonPencilTouches ? nonPencilTouches : touches;
|
||||
if(touchMode == NativeTouch || touchMode == RelativeTouch){
|
||||
if(touchMode != AbsoluteTouch){
|
||||
[self->touchHandler touchesEnded:targetTouches withEvent:event]; // when touches ended, must call the native touchhandler before onScreenControls, since the NSSet of touches captured by on screen button shall be updated later
|
||||
[self->_onScreenControls handleTouchUpEvent:targetTouches];
|
||||
if([self isOnScreenWidgetEnabled]) [self->_onScreenControls handleTouchUpEvent:targetTouches];
|
||||
}
|
||||
else if(![_onScreenControls handleTouchUpEvent:targetTouches]) [touchHandler touchesEnded:targetTouches withEvent:event];
|
||||
}
|
||||
|
||||
@@ -2543,7 +2543,8 @@ BOOL isCustomResolution(int resolutionSelected) {
|
||||
}
|
||||
|
||||
- (bool)isNotNativeTouchOnly{
|
||||
return (self.enableOswForNativeTouchSwitch.isOn && self.touchModeSelector1.selectedSegmentIndex == NativeTouch) || self.touchModeSelector1.selectedSegmentIndex != NativeTouch;
|
||||
// return (self.enableOswForNativeTouchSwitch.isOn && self.touchModeSelector1.selectedSegmentIndex == NativeTouch) || self.touchModeSelector1.selectedSegmentIndex != NativeTouch;
|
||||
return true;
|
||||
}
|
||||
|
||||
- (void)handleOswGestureChange{
|
||||
@@ -3193,8 +3194,10 @@ BOOL isCustomResolution(int resolutionSelected) {
|
||||
// bool customOscEnabled = [self isOswEnabled] && [self.onScreenWidgetSelector selectedSegmentIndex] == OnScreenControlsLevelCustom;
|
||||
|
||||
bool isNativeTouch = sender.selectedSegmentIndex == NativeTouch;
|
||||
bool isEgmerging = self.enableOswSwitchStack.hidden != !isNativeTouch && isNativeTouch;
|
||||
self.enableOswSwitchStack.hidden = !isNativeTouch;
|
||||
// bool isEgmerging = self.enableOswSwitchStack.hidden != !isNativeTouch && isNativeTouch;
|
||||
bool isEgmerging = false;
|
||||
// self.enableOswSwitchStack.hidden = !isNativeTouch;
|
||||
self.enableOswSwitchStack.hidden = true;
|
||||
if(isEgmerging) [self highlightEmergingStack:self.enableOswSwitchStack];
|
||||
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
|
||||
|
||||
- (bool)isOnScreenWidgetEnabled{
|
||||
return (_oscProfile.touchMode == RelativeTouch || _oscProfile.touchMode == NativeTouch || _oscProfile.touchMode == AbsoluteTouch || _oscProfile.touchMode == TouchDisabled) && _settings.onscreenControls.intValue == OnScreenControlsLevelCustom;
|
||||
return _settings.onscreenControls.intValue == OnScreenControlsLevelCustom;
|
||||
}
|
||||
|
||||
- (void)setupPiPControllerWithRenderer:(VideoDecoderRenderer *)videoRenderer { // Ensure we have the renderer and its layer
|
||||
|
||||
Reference in New Issue
Block a user