From 6e85924bd3b36189b5dd5e2c975e3b2dff224ba7 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 29 Jul 2013 19:17:47 +0200 Subject: [PATCH] Replaced selector test with NSAppKitVersionNumber. --- src/cocoa_window.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 347274bb..d827d905 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -74,7 +74,7 @@ static float transformY(float y) static NSRect convertRectToBacking(_GLFWwindow* window, NSRect contentRect) { #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 - if ([window->ns.view respondsToSelector:@selector(convertRectToBacking:)]) + if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_7) return [window->ns.view convertRectToBacking:contentRect]; else #endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ @@ -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 (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_7) { deltaX = [event scrollingDeltaX]; deltaY = [event scrollingDeltaY]; @@ -846,7 +846,7 @@ static GLboolean createWindow(_GLFWwindow* window, window->ns.view = [[GLFWContentView alloc] initWithGlfwWindow:window]; #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 - if ([window->ns.view respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)]) + if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_7) [window->ns.view setWantsBestResolutionOpenGLSurface:YES]; #endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/ @@ -858,7 +858,7 @@ static GLboolean createWindow(_GLFWwindow* window, [window->ns.object center]; #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070 - if ([window->ns.object respondsToSelector:@selector(setRestorable:)]) + if (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_7) [window->ns.object setRestorable:NO]; #endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/