mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 13:04:35 +00:00
Replaced selector test with NSAppKitVersionNumber.
This commit is contained in:
parent
f7282e86c0
commit
6e85924bd3
@ -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*/
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user