recover absolute touch related codes
This commit is contained in:
1 parent
bfe02ed6a3
commit
c8f0d8bf0b
2 files changed
+31
-31
No files matched your search
@@ -125,19 +125,19 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
|||||||
// mice correctly, but UIKit does. We will register for both and ignore UIKit
|
// mice correctly, but UIKit does. We will register for both and ignore UIKit
|
||||||
// events if a GCMouse is connected.
|
// events if a GCMouse is connected.
|
||||||
if (@available(iOS 13.4, *)) {
|
if (@available(iOS 13.4, *)) {
|
||||||
// [self addInteraction:[[UIPointerInteraction alloc] initWithDelegate:self]];
|
[self addInteraction:[[UIPointerInteraction alloc] initWithDelegate:self]];
|
||||||
//
|
|
||||||
// UIPanGestureRecognizer *discreteMouseWheelRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(mouseWheelMovedDiscrete:)];
|
UIPanGestureRecognizer *discreteMouseWheelRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(mouseWheelMovedDiscrete:)];
|
||||||
// discreteMouseWheelRecognizer.maximumNumberOfTouches = 0;
|
discreteMouseWheelRecognizer.maximumNumberOfTouches = 0;
|
||||||
// discreteMouseWheelRecognizer.allowedScrollTypesMask = UIScrollTypeMaskDiscrete;
|
discreteMouseWheelRecognizer.allowedScrollTypesMask = UIScrollTypeMaskDiscrete;
|
||||||
// discreteMouseWheelRecognizer.allowedTouchTypes = @[@(UITouchTypeIndirectPointer)];
|
discreteMouseWheelRecognizer.allowedTouchTypes = @[@(UITouchTypeIndirectPointer)];
|
||||||
// [self addGestureRecognizer:discreteMouseWheelRecognizer];
|
[self addGestureRecognizer:discreteMouseWheelRecognizer];
|
||||||
//
|
|
||||||
// UIPanGestureRecognizer *continuousMouseWheelRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(mouseWheelMovedContinuous:)];
|
UIPanGestureRecognizer *continuousMouseWheelRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(mouseWheelMovedContinuous:)];
|
||||||
// continuousMouseWheelRecognizer.maximumNumberOfTouches = 0;
|
continuousMouseWheelRecognizer.maximumNumberOfTouches = 0;
|
||||||
// continuousMouseWheelRecognizer.allowedScrollTypesMask = UIScrollTypeMaskContinuous;
|
continuousMouseWheelRecognizer.allowedScrollTypesMask = UIScrollTypeMaskContinuous;
|
||||||
// continuousMouseWheelRecognizer.allowedTouchTypes = @[@(UITouchTypeIndirectPointer)];
|
continuousMouseWheelRecognizer.allowedTouchTypes = @[@(UITouchTypeIndirectPointer)];
|
||||||
// [self addGestureRecognizer:continuousMouseWheelRecognizer];
|
[self addGestureRecognizer:continuousMouseWheelRecognizer];
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__IPHONE_16_1) || defined(__TVOS_16_1)
|
#if defined(__IPHONE_16_1) || defined(__TVOS_16_1)
|
||||||
|
|||||||
@@ -192,24 +192,24 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Only enable scroll and zoom in absolute touch mode
|
// Only enable scroll and zoom in absolute touch mode
|
||||||
// if (_settings.absoluteTouchMode) {
|
if (_settings.touchMode.intValue == ABSOLUTE_TOUCH_MODE) {
|
||||||
// _scrollView = [[UIScrollView alloc] initWithFrame:self.view.frame];
|
_scrollView = [[UIScrollView alloc] initWithFrame:self.view.frame];
|
||||||
//#if !TARGET_OS_TV
|
#if !TARGET_OS_TV
|
||||||
// [_scrollView.panGestureRecognizer setMinimumNumberOfTouches:2];
|
[_scrollView.panGestureRecognizer setMinimumNumberOfTouches:2];
|
||||||
//#endif
|
#endif
|
||||||
// [_scrollView setShowsHorizontalScrollIndicator:NO];
|
[_scrollView setShowsHorizontalScrollIndicator:NO];
|
||||||
// [_scrollView setShowsVerticalScrollIndicator:NO];
|
[_scrollView setShowsVerticalScrollIndicator:NO];
|
||||||
// [_scrollView setDelegate:self];
|
[_scrollView setDelegate:self];
|
||||||
// [_scrollView setMaximumZoomScale:10.0f];
|
[_scrollView setMaximumZoomScale:10.0f];
|
||||||
//
|
|
||||||
// // Add StreamView inside a UIScrollView for absolute mode
|
// Add StreamView inside a UIScrollView for absolute mode
|
||||||
// [_scrollView addSubview:_streamView];
|
[_scrollView addSubview:_streamView];
|
||||||
// [self.view addSubview:_scrollView];
|
[self.view addSubview:_scrollView];
|
||||||
// }
|
}
|
||||||
// else {
|
else {
|
||||||
// // Add StreamView directly in relative mode
|
// Add StreamView directly in relative mode
|
||||||
// [self.view addSubview:_streamView];
|
[self.view addSubview:_streamView];
|
||||||
// }
|
}
|
||||||
[self.view addSubview:_streamView];
|
[self.view addSubview:_streamView];
|
||||||
[self.view addSubview:_stageLabel];
|
[self.view addSubview:_stageLabel];
|
||||||
[self.view addSubview:_spinner];
|
[self.view addSubview:_spinner];
|
||||||
|
|||||||
Reference in new issue
Block a user