1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-10-08 07:07:25 -04:00

Fixed #if-guard logic and signature for hasPreciseScrollingDeltas.

This commit is contained in:
Dmitri Shuralyov 2013-07-24 23:06:58 -07:00
parent bd2d571c31
commit c99b7fe7da

View File

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