mirror of
https://github.com/gwm17/glfw.git
synced 2024-11-27 04:28:52 -05:00
Fixed #if-guard logic and signature for hasPreciseScrollingDeltas.
This commit is contained in:
parent
bd2d571c31
commit
c99b7fe7da
|
@ -609,7 +609,7 @@ static int translateKey(unsigned int key)
|
|||
double deltaX, deltaY;
|
||||
|
||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
||||
if ([event respondsToSelector:@selector(hasPreciseScrollingDeltas:)])
|
||||
if ([event respondsToSelector:@selector(hasPreciseScrollingDeltas)])
|
||||
{
|
||||
deltaX = [event scrollingDeltaX];
|
||||
deltaY = [event scrollingDeltaY];
|
||||
|
@ -621,12 +621,11 @@ static int translateKey(unsigned int key)
|
|||
}
|
||||
}
|
||||
else
|
||||
#else
|
||||
#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
|
||||
{
|
||||
deltaX = [event deltaX];
|
||||
deltaY = [event deltaY];
|
||||
}
|
||||
#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
|
||||
|
||||
if (fabs(deltaX) > 0.0 || fabs(deltaY) > 0.0)
|
||||
_glfwInputScroll(window, deltaX, deltaY);
|
||||
|
|
Loading…
Reference in New Issue
Block a user