1
0
Fork 0

Change: [OSX] Prevent 2D scrolling for traditional scroll wheel mice

pull/7275/head
Alexander Weiss 2019-01-26 16:34:32 +01:00 committed by Michael Lutz
parent 0bb395b21d
commit 77ab6f8ec7
1 changed files with 4 additions and 1 deletions

View File

@ -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