summaryrefslogtreecommitdiffstats
path: root/libvo/gl_common.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-04-25 10:53:01 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-04-25 10:53:01 +0000
commita9ff7793e3491b5e78f4baed207b31eeeed61896 (patch)
tree7fb4acfb097515adcfc09b2b1798b53404fcea91 /libvo/gl_common.c
parent3a34dbc927a4980606abb4331e7ba8ca6fc1a90d (diff)
downloadmpv-a9ff7793e3491b5e78f4baed207b31eeeed61896.tar.bz2
mpv-a9ff7793e3491b5e78f4baed207b31eeeed61896.tar.xz
Support for auto-selecting the OpenGL backend.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31086 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libvo/gl_common.c')
-rw-r--r--libvo/gl_common.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c
index c8e3884f87..2e2b04c920 100644
--- a/libvo/gl_common.c
+++ b/libvo/gl_common.c
@@ -1901,6 +1901,14 @@ static void dummy_update_xinerama_info(void) {
}
int init_mpglcontext(MPGLContext *ctx, enum MPGLType type) {
+ if (type == GLTYPE_AUTO) {
+ int res = init_mpglcontext(ctx, GLTYPE_W32);
+ if (res) return res;
+ res = init_mpglcontext(ctx, GLTYPE_X11);
+ if (res) return res;
+ res = init_mpglcontext(ctx, GLTYPE_SDL);
+ return res;
+ }
memset(ctx, 0, sizeof(*ctx));
ctx->setGlWindow = setGlWindow_dummy;
ctx->releaseGlContext = releaseGlContext_dummy;