summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-12-19 02:25:03 +0100
committerwm4 <wm4@nowhere>2014-12-19 02:26:14 +0100
commitfd6256f9c7ffcbab34ba4120c9b5da28502a8462 (patch)
treee84073df3cbbe6d1d0df9aebc9a72da963a8606b /video
parenta0051b9da28fb67cebae1fef322603ddb8f619f8 (diff)
downloadmpv-fd6256f9c7ffcbab34ba4120c9b5da28502a8462.tar.bz2
mpv-fd6256f9c7ffcbab34ba4120c9b5da28502a8462.tar.xz
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.
Diffstat (limited to 'video')
-rw-r--r--video/out/gl_common.h4
1 files changed, 2 insertions, 2 deletions
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)