diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2012-05-15 09:26:10 +0200 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2012-05-15 10:37:58 +0200 |
commit | 77be8b1240dc082df1d7c05bf95f01337e09cb5f (patch) | |
tree | 2db8af6444446d8cef6cbc019a1a4a8d79c3cfa6 | |
parent | 43337db0a49029da316157d9bc57e9c44e846e69 (diff) | |
download | mpv-77be8b1240dc082df1d7c05bf95f01337e09cb5f.tar.bz2 mpv-77be8b1240dc082df1d7c05bf95f01337e09cb5f.tar.xz |
cocoa: gl3: make window creation fail on <10.7
Versions of OSX prior to 10.7 do not support OpenGL 3. Fail the window
creation when that is the case.
-rw-r--r-- | libvo/cocoa_common.m | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libvo/cocoa_common.m b/libvo/cocoa_common.m index 5b2bc9ab4e..581b5605ec 100644 --- a/libvo/cocoa_common.m +++ b/libvo/cocoa_common.m @@ -250,6 +250,11 @@ int vo_cocoa_create_window(struct vo *vo, uint32_t d_width, if (is_lion_or_better()) { attr[i++] = NSOpenGLPFAOpenGLProfile; attr[i++] = (gl3profile ? NSOpenGLProfileVersion3_2Core : NSOpenGLProfileVersionLegacy); + } else if(gl3profile) { + mp_msg(MSGT_VO, MSGL_ERR, + "[cocoa] Invalid pixel format attribute " + "(GL3 is not supported on OSX versions prior to 10.7)\n"); + return -1; } attr[i++] = NSOpenGLPFADoubleBuffer; // double buffered attr[i++] = NSOpenGLPFADepthSize; |