summaryrefslogtreecommitdiffstats
path: root/libvo/gl_common.c
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2012-09-13 09:32:59 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2012-10-16 07:19:32 +0200
commitb94619724327e555a348e2cdcd4c6d2ccde8f8b1 (patch)
treed66de095c8b3f494e9d86ce3ca80258949aa925c /libvo/gl_common.c
parent511d5478f91f06ad3bc1354db68b114771c89812 (diff)
downloadmpv-b94619724327e555a348e2cdcd4c6d2ccde8f8b1.tar.bz2
mpv-b94619724327e555a348e2cdcd4c6d2ccde8f8b1.tar.xz
cocoa_common: save state in the vo struct
Save the cocoa state in an instance variable for the Objective-C part of the code and use a field in the vo struct for the raw C part of the code.
Diffstat (limited to 'libvo/gl_common.c')
-rw-r--r--libvo/gl_common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index 8af486d4eb..43df55ea9b 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -1951,9 +1951,9 @@ static bool create_window_cocoa(struct MPGLContext *ctx, uint32_t d_width,
getFunctions(ctx->gl, (void *)vo_cocoa_glgetaddr, NULL, gl3);
if (gl3) {
- ctx->depth_r = vo_cocoa_cgl_color_size();
- ctx->depth_g = vo_cocoa_cgl_color_size();
- ctx->depth_b = vo_cocoa_cgl_color_size();
+ ctx->depth_r = vo_cocoa_cgl_color_size(ctx->vo);
+ ctx->depth_g = vo_cocoa_cgl_color_size(ctx->vo);
+ ctx->depth_b = vo_cocoa_cgl_color_size(ctx->vo);
}
if (!ctx->gl->SwapInterval)
@@ -1980,7 +1980,7 @@ static void releaseGlContext_cocoa(MPGLContext *ctx)
static void swapGlBuffers_cocoa(MPGLContext *ctx)
{
- vo_cocoa_swap_buffers();
+ vo_cocoa_swap_buffers(ctx->vo);
}
static int cocoa_check_events(struct vo *vo)