mirror of
https://github.com/moonlight-stream/moonlight-ios.git
synced 2026-06-17 14:11:35 +00:00
Go back to UIPanGestureRecognizer for all scroll events
GCMouse is broken in iPad 15 for mice with discrete scroll wheel events
This commit is contained in:
@@ -432,19 +432,6 @@ static const double MOUSE_SPEED_DIVISOR = 2.5;
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Confirm scroll direction
|
|
||||||
mouse.mouseInput.scroll.yAxis.valueChangedHandler = ^(GCControllerAxisInput * _Nonnull axis, float value) {
|
|
||||||
self->accumulatedScrollY += -value;
|
|
||||||
|
|
||||||
short truncatedScrollY = (short)self->accumulatedScrollY;
|
|
||||||
|
|
||||||
if (truncatedScrollY != 0) {
|
|
||||||
LiSendHighResScrollEvent(truncatedScrollY);
|
|
||||||
|
|
||||||
self->accumulatedScrollY -= truncatedScrollY;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
-(void) updateAutoOnScreenControlMode
|
-(void) updateAutoOnScreenControlMode
|
||||||
|
|||||||
@@ -449,13 +449,6 @@ static const double X1_MOUSE_SPEED_DIVISOR = 2.5;
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)mouseWheelMoved:(UIPanGestureRecognizer *)gesture {
|
- (void)mouseWheelMoved:(UIPanGestureRecognizer *)gesture {
|
||||||
if (@available(iOS 14.0, *)) {
|
|
||||||
if ([GCMouse current] != nil) {
|
|
||||||
// We'll handle this with GCMouse. Do nothing here.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (gesture.state) {
|
switch (gesture.state) {
|
||||||
case UIGestureRecognizerStateBegan:
|
case UIGestureRecognizerStateBegan:
|
||||||
case UIGestureRecognizerStateChanged:
|
case UIGestureRecognizerStateChanged:
|
||||||
|
|||||||
Reference in New Issue
Block a user