summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/video/cocoa/event.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video/cocoa/event.mm b/src/video/cocoa/event.mm
index 77f683af8..de812a70d 100644
--- a/src/video/cocoa/event.mm
+++ b/src/video/cocoa/event.mm
@@ -581,7 +581,10 @@ static bool QZ_PollEvent()
/* Use precise scrolling-specific deltas if they're supported. */
#if (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7)
- if ([event respondsToSelector:@selector(scrollingDeltaX)]) {
+ if ([event respondsToSelector:@selector(hasPreciseScrollingDeltas)]) {
+ /* No precise deltas indicates a scroll wheel is being used, so we don't want 2D scrolling. */
+ if (![ event hasPreciseScrollingDeltas ]) break;
+
deltaX = [ event scrollingDeltaX ] * 0.5f;
deltaY = [ event scrollingDeltaY ] * 0.5f;
} else