mirror of https://github.com/OpenTTD/OpenTTD
Change: [OSX] Prevent 2D scrolling for traditional scroll wheel mice
parent
0bb395b21d
commit
77ab6f8ec7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue