From fd6256f9c7ffcbab34ba4120c9b5da28502a8462 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 19 Dec 2014 02:25:03 +0100 Subject: vo_opengl: unbork Probably. The version handling schema is a bit strange (and led to a tricky and obvious bug), but it's quite similar to what OpenGL does at some places, so I blame the OpenGL standard. --- video/out/gl_common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'video/out') diff --git a/video/out/gl_common.h b/video/out/gl_common.h index 3f0f999eaa..e391663b93 100644 --- a/video/out/gl_common.h +++ b/video/out/gl_common.h @@ -84,9 +84,9 @@ enum { // E.g. 310 means 3.1 // Code doesn't have to use the macros; they are for convenience only. -#define MPGL_VER(major, minor) (((major) * 100) + (minor)) +#define MPGL_VER(major, minor) (((major) * 100) + (minor) * 10) #define MPGL_VER_GET_MAJOR(ver) ((unsigned)(ver) / 100) -#define MPGL_VER_GET_MINOR(ver) ((unsigned)(ver) % 100) +#define MPGL_VER_GET_MINOR(ver) ((unsigned)(ver) % 100 / 10) #define MPGL_VER_P(ver) MPGL_VER_GET_MAJOR(ver), MPGL_VER_GET_MINOR(ver) -- cgit v1.2.3