From 5a6ba2a4fd35ba27c288d8d845f262a0ceee7170 Mon Sep 17 00:00:00 2001 From: James Ross-Gowan Date: Mon, 11 Jul 2016 00:22:12 +1000 Subject: 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. --- video/out/opengl/context_angle.c | 15 ++++++++------- 1 file 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); -- cgit v1.2.3