Fixed mouse drag with an external mouse on iOS

This commit is contained in:
Sam Lantinga 2020-06-08 17:01:50 -07:00
parent d0947c1483
commit 3ac24bfc1a

View File

@ -73,6 +73,9 @@ extern int SDL_AppleTVRemoteOpenedAsJoystick;
UIPanGestureRecognizer *mouseWheelRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(mouseWheelGesture:)];
mouseWheelRecognizer.allowedScrollTypesMask = UIScrollTypeMaskDiscrete;
mouseWheelRecognizer.allowedTouchTypes = @[ @(UITouchTypeIndirectPointer) ];
mouseWheelRecognizer.cancelsTouchesInView = NO;
mouseWheelRecognizer.delaysTouchesBegan = NO;
mouseWheelRecognizer.delaysTouchesEnded = NO;
[self addGestureRecognizer:mouseWheelRecognizer];
}
#endif