summaryrefslogtreecommitdiffstats
path: root/libvo/gl_common.c
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2011-12-04 21:53:43 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2011-12-06 23:11:50 +0100
commitb2a41e20be6c1831543e72987ce7d285655fc311 (patch)
treeccc6c6ba44ab1491191413ae3358bdba1007a780 /libvo/gl_common.c
parentbd8ba89cca217cc78df31a357f77220a618a9b9a (diff)
downloadmpv-b2a41e20be6c1831543e72987ce7d285655fc311.tar.bz2
mpv-b2a41e20be6c1831543e72987ce7d285655fc311.tar.xz
vo_gl: cocoa: point swapinterval to cocoa_common function
Currently there is no way to set the swap interval with a function that has a signature compatible with other platforms' gl extensions. Make a wrapper function around the gui toolkit method of setting the swap interval property, and point gl->SwapInterval to it.
Diffstat (limited to 'libvo/gl_common.c')
-rw-r--r--libvo/gl_common.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index d9814c6f6a..7cca800d40 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -1625,6 +1625,8 @@ static int setGlWindow_cocoa(MPGLContext *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;
}