Copied Cocoa entry point bugfix from 2.7.2.

This commit is contained in:
Camilla Berglund
2011-07-27 18:40:41 +02:00
parent 95cddf85e1
commit d24acb7f64
2 changed files with 10 additions and 0 deletions
+9
View File
@@ -201,6 +201,15 @@ int _glfwPlatformInit(void)
// Implicitly create shared NSApplication instance
[GLFWApplication sharedApplication];
_glfwLibrary.NS.OpenGLFramework =
CFBundleGetBundleWithIdentifier( CFSTR( "com.apple.opengl" ) );
if (_glfwLibrary.NS.OpenGLFramework == NULL)
{
_glfwSetError(GLFW_PLATFORM_ERROR,
"glfwInit: Failed to locate OpenGL framework");
return GL_FALSE;
}
NSString* resourcePath = [[NSBundle mainBundle] resourcePath];
if (access([resourcePath cStringUsingEncoding:NSUTF8StringEncoding], R_OK) == 0)