1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 10:48:51 -05: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; double deltaX, deltaY;
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
if ([event respondsToSelector:@selector(hasPreciseScrollingDeltas:)]) if ([event respondsToSelector:@selector(hasPreciseScrollingDeltas)])
{ {
deltaX = [event scrollingDeltaX]; deltaX = [event scrollingDeltaX];
deltaY = [event scrollingDeltaY]; deltaY = [event scrollingDeltaY];
@ -621,12 +621,11 @@ static int translateKey(unsigned int key)
} }
} }
else else
#else #endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
{ {
deltaX = [event deltaX]; deltaX = [event deltaX];
deltaY = [event deltaY]; deltaY = [event deltaY];
} }
#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
if (fabs(deltaX) > 0.0 || fabs(deltaY) > 0.0) if (fabs(deltaX) > 0.0 || fabs(deltaY) > 0.0)
_glfwInputScroll(window, deltaX, deltaY); _glfwInputScroll(window, deltaX, deltaY);