Enabled compilation on OS X 10.6 SDK.

This commit is contained in:
Camilla Berglund 2013-07-04 15:02:01 +02:00
parent 7a03ca8dbc
commit 58c69a9ac4
2 changed files with 7 additions and 0 deletions

View File

@ -107,6 +107,7 @@ See the [GLFW 3.0 documentation](http://www.glfw.org/docs/3.0/).
- [Win32] Bugfix: The user32 and dwmapi module handles were not freed on - [Win32] Bugfix: The user32 and dwmapi module handles were not freed on
library termination library termination
- [Cocoa] Bugfix: The clipboard string was not freed on terminate - [Cocoa] Bugfix: The clipboard string was not freed on terminate
- [Cocoa] Bugfix: Selectors were used that are not declared by the 10.6 SDK
- [X11] Bugfix: Override-redirect windows were resized to the desired instead - [X11] Bugfix: Override-redirect windows were resized to the desired instead
of the actual resolution of the selected video mode of the actual resolution of the selected video mode

View File

@ -73,9 +73,11 @@ 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 ([window->ns.view respondsToSelector:@selector(convertRectToBacking:)]) if ([window->ns.view respondsToSelector:@selector(convertRectToBacking:)])
return [window->ns.view convertRectToBacking:contentRect]; return [window->ns.view convertRectToBacking:contentRect];
else else
#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
return contentRect; return contentRect;
} }
@ -825,8 +827,10 @@ 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 ([window->ns.view respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)]) if ([window->ns.view respondsToSelector:@selector(setWantsBestResolutionOpenGLSurface:)])
[window->ns.view setWantsBestResolutionOpenGLSurface:YES]; [window->ns.view setWantsBestResolutionOpenGLSurface:YES];
#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
[window->ns.object setTitle:[NSString stringWithUTF8String:wndconfig->title]]; [window->ns.object setTitle:[NSString stringWithUTF8String:wndconfig->title]];
[window->ns.object setContentView:window->ns.view]; [window->ns.object setContentView:window->ns.view];
@ -835,8 +839,10 @@ static GLboolean createWindow(_GLFWwindow* window,
[window->ns.object disableCursorRects]; [window->ns.object disableCursorRects];
[window->ns.object center]; [window->ns.object center];
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
if ([window->ns.object respondsToSelector:@selector(setRestorable:)]) if ([window->ns.object respondsToSelector:@selector(setRestorable:)])
[window->ns.object setRestorable:NO]; [window->ns.object setRestorable:NO];
#endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
return GL_TRUE; return GL_TRUE;
} }