summaryrefslogtreecommitdiffstats
path: root/libvo/gl_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'libvo/gl_common.c')
-rw-r--r--libvo/gl_common.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index 27febc1b36..7cca800d40 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -1615,12 +1615,18 @@ void glDrawTex(GL *gl, GLfloat x, GLfloat y, GLfloat w, GLfloat h,
static int create_window_cocoa(struct MPGLContext *ctx, uint32_t d_width,
uint32_t d_height, uint32_t flags)
{
- return vo_cocoa_create_window(ctx, d_width, d_height, flags);
+ if (vo_cocoa_create_window(ctx->vo, d_width, d_height, flags) == 0) {
+ return SET_WINDOW_OK;
+ } else {
+ return SET_WINDOW_FAILED;
+ }
}
static int setGlWindow_cocoa(MPGLContext *ctx)
{
- vo_cocoa_change_attributes(ctx);
+ vo_cocoa_change_attributes(ctx->vo);
getFunctions(ctx->gl, (void *)getdladdr, NULL);
+ if (!ctx->gl->SwapInterval)
+ ctx->gl->SwapInterval = vo_cocoa_swap_interval;
return SET_WINDOW_OK;
}