cocoa: simplify logic that returns used bits per color

This commit is contained in:
Stefano Pigozzi 2014-07-08 22:06:57 +02:00
parent b5bbb49a1a
commit 609187082f
1 changed files with 1 additions and 9 deletions

View File

@ -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)