summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossymiles@gmail.com>2016-07-11 00:22:12 +1000
committerJames Ross-Gowan <rossymiles@gmail.com>2016-07-11 22:07:13 +1000
commit5a6ba2a4fd35ba27c288d8d845f262a0ceee7170 (patch)
tree77d270bdcecb6b5c9d02a8c0cd645a72a7b432c1
parente246c3f060513a9bcda6097f6ca6ddfba5bf3579 (diff)
downloadmpv-5a6ba2a4fd35ba27c288d8d845f262a0ceee7170.tar.bz2
mpv-5a6ba2a4fd35ba27c288d8d845f262a0ceee7170.tar.xz
vo_opengl: angle: try D3D9 when D3D11 fails eglInitialize
This will happen when D3D11 is present on the machine but the supported feature level is too low.
-rw-r--r--video/out/opengl/context_angle.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/video/out/opengl/context_angle.c b/video/out/opengl/context_angle.c
index 28515f431f..39ef3c6b5e 100644
--- a/video/out/opengl/context_angle.c
+++ b/video/out/opengl/context_angle.c
@@ -216,19 +216,20 @@ static int angle_init(struct MPGLContext *ctx, int flags)
p->egl_display = eglGetPlatformDisplayEXT(EGL_PLATFORM_ANGLE_ANGLE, dc,
display_attributes);
- if (p->egl_display != EGL_NO_DISPLAY)
- break;
+ if (p->egl_display == EGL_NO_DISPLAY)
+ continue;
+
+ if (!eglInitialize(p->egl_display, NULL, NULL)) {
+ p->egl_display = EGL_NO_DISPLAY;
+ continue;
+ }
+ break;
}
if (p->egl_display == EGL_NO_DISPLAY) {
MP_FATAL(vo, "Couldn't get display\n");
goto fail;
}
- if (!eglInitialize(p->egl_display, NULL, NULL)) {
- MP_FATAL(vo, "Couldn't initialize EGL\n");
- goto fail;
- }
-
const char *exts = eglQueryString(p->egl_display, EGL_EXTENSIONS);
if (exts)
MP_DBG(ctx->vo, "EGL extensions: %s\n", exts);