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)
|
static NSRect convertRectToBacking(_GLFWwindow* window, NSRect contentRect)
|
||||||
{
|
{
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
#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];
|
return [window->ns.view convertRectToBacking:contentRect];
|
||||||
else
|
else
|
||||||
#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
|
#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
|
||||||
@ -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 (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_7)
|
||||||
{
|
{
|
||||||
deltaX = [event scrollingDeltaX];
|
deltaX = [event scrollingDeltaX];
|
||||||
deltaY = [event scrollingDeltaY];
|
deltaY = [event scrollingDeltaY];
|
||||||
@ -846,7 +846,7 @@ static GLboolean createWindow(_GLFWwindow* window,
|
|||||||
window->ns.view = [[GLFWContentView alloc] initWithGlfwWindow:window];
|
window->ns.view = [[GLFWContentView alloc] initWithGlfwWindow:window];
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
#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];
|
[window->ns.view setWantsBestResolutionOpenGLSurface:YES];
|
||||||
#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
|
#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
|
||||||
|
|
||||||
@ -858,7 +858,7 @@ static GLboolean createWindow(_GLFWwindow* window,
|
|||||||
[window->ns.object center];
|
[window->ns.object center];
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
|
#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];
|
[window->ns.object setRestorable:NO];
|
||||||
#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
|
#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user