mirror of
https://github.com/glfw/glfw.git
synced 2024-11-29 23:54:37 +00:00
Merge pull request #159 from metajack/fix-10-7-build
Fixed build on OS X 10.7.
This commit is contained in:
commit
baf100f78c
@ -33,6 +33,7 @@
|
|||||||
#include <IOKit/graphics/IOGraphicsLib.h>
|
#include <IOKit/graphics/IOGraphicsLib.h>
|
||||||
#include <IOKit/graphics/IOGraphicsLib.h>
|
#include <IOKit/graphics/IOGraphicsLib.h>
|
||||||
#include <CoreVideo/CVBase.h>
|
#include <CoreVideo/CVBase.h>
|
||||||
|
#include <CoreVideo/CVDisplayLink.h>
|
||||||
|
|
||||||
|
|
||||||
// Get the name of the specified display
|
// Get the name of the specified display
|
||||||
|
@ -105,7 +105,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 (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_7)
|
if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6)
|
||||||
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*/
|
||||||
@ -635,7 +635,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 (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_7)
|
if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6)
|
||||||
{
|
{
|
||||||
deltaX = [event scrollingDeltaX];
|
deltaX = [event scrollingDeltaX];
|
||||||
deltaY = [event scrollingDeltaY];
|
deltaY = [event scrollingDeltaY];
|
||||||
@ -867,7 +867,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 (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_7)
|
if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6)
|
||||||
{
|
{
|
||||||
[window->ns.view setWantsBestResolutionOpenGLSurface:YES];
|
[window->ns.view setWantsBestResolutionOpenGLSurface:YES];
|
||||||
|
|
||||||
@ -883,7 +883,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 (floor(NSAppKitVersionNumber) >= NSAppKitVersionNumber10_7)
|
if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6)
|
||||||
[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