Allow not capture mouse
This commit is contained in:
@@ -48,6 +48,8 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
double accumulatedMouseDeltaX;
|
||||
double accumulatedMouseDeltaY;
|
||||
|
||||
int mouseMode;
|
||||
|
||||
UIResponder* touchHandler;
|
||||
|
||||
id<UserInteractionDelegate> interactionDelegate;
|
||||
@@ -76,6 +78,8 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
|
||||
settings = [[[DataManager alloc] init] getSettings];
|
||||
|
||||
mouseMode = streamConfig.mouseMode;
|
||||
|
||||
keysDown = [[NSMutableSet alloc] init];
|
||||
keyInputField = [[KeyboardInputField alloc] initWithFrame:CGRectZero];
|
||||
[keyInputField setKeyboardType:UIKeyboardTypeDefault];
|
||||
@@ -869,7 +873,7 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
regionForRequest:(UIPointerRegionRequest *)request
|
||||
defaultRegion:(UIPointerRegion *)defaultRegion API_AVAILABLE(ios(13.4)) {
|
||||
if (@available(iOS 14.0, *)) {
|
||||
if ([GCMouse current] != nil) {
|
||||
if ([GCMouse current] != nil && mouseMode == 0) {
|
||||
// We'll handle this with GCMouse. Do nothing here.
|
||||
return nil;
|
||||
}
|
||||
@@ -897,8 +901,11 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
||||
}
|
||||
|
||||
- (UIPointerStyle *)pointerInteraction:(UIPointerInteraction *)interaction styleForRegion:(UIPointerRegion *)region API_AVAILABLE(ios(13.4)) {
|
||||
// Always hide the mouse cursor over our stream view
|
||||
return [UIPointerStyle hiddenPointerStyle];
|
||||
if(mouseMode != 2){
|
||||
return [UIPointerStyle hiddenPointerStyle];
|
||||
}else{
|
||||
return nil;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)mouseWheelMovedContinuous:(UIPanGestureRecognizer *)gesture {
|
||||
|
||||
Reference in New Issue
Block a user