summaryrefslogtreecommitdiffstats
path: root/libvo/gl_common.c
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2011-12-04 18:52:16 +0100
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2011-12-06 23:10:54 +0100
commitbd8ba89cca217cc78df31a357f77220a618a9b9a (patch)
tree1fbc694969a0008940782210c989856b1577819c /libvo/gl_common.c
parent82118dc35edfbf9b6714e1e4e6b1823fc3205ff7 (diff)
downloadmpv-bd8ba89cca217cc78df31a357f77220a618a9b9a.tar.bz2
mpv-bd8ba89cca217cc78df31a357f77220a618a9b9a.tar.xz
vo_gl: cocoa: decouple cocoa_common from gl_common
Remove the useless dependency on MPGLContext from cocoa_common, since it was used just to access the vo struct. Change gl_common to pass the vo struct directly to all the cocoa_common functions.
Diffstat (limited to 'libvo/gl_common.c')
-rw-r--r--libvo/gl_common.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index 27febc1b36..d9814c6f6a 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -1615,11 +1615,15 @@ 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);
return SET_WINDOW_OK;
}