From 77ab6f8ec7e68fc83b752a4fdfa2a673ca5fa9b4 Mon Sep 17 00:00:00 2001 From: Alexander Weiss Date: Sat, 26 Jan 2019 16:34:32 +0100 Subject: Change: [OSX] Prevent 2D scrolling for traditional scroll wheel mice --- src/video/cocoa/event.mm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/video') 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 -- cgit v1.2.3-70-g09d2