From c99b7fe7da346326afa96ecf6ada473ab7427606 Mon Sep 17 00:00:00 2001 From: Dmitri Shuralyov Date: Wed, 24 Jul 2013 23:06:58 -0700 Subject: [PATCH] Fixed #if-guard logic and signature for hasPreciseScrollingDeltas. --- src/cocoa_window.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 641b4d4c..347274bb 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -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);