From 609187082fa531c1d8fad6a1bed71506873ebff9 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 8 Jul 2014 22:06:57 +0200 Subject: cocoa: simplify logic that returns used bits per color --- video/out/gl_cocoa.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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) -- cgit v1.2.3