diff --git a/video/out/gl_cocoa.c b/video/out/gl_cocoa.c index a32ba8f23d..b3db13fea1 100644 --- a/video/out/gl_cocoa.c +++ b/video/out/gl_cocoa.c @@ -47,15 +47,7 @@ static int cgl_color_size(struct MPGLContext *ctx) struct cgl_context *p = ctx->priv; GLint value; CGLDescribePixelFormat(p->pix, 0, kCGLPFAColorSize, &value); - switch (value) { - case 32: - case 24: - return 8; - case 16: - return 5; - default: - return 8; - } + return value > 16 ? 8 : 5; } static bool create_gl_context(struct MPGLContext *ctx)