diff options
Diffstat (limited to 'video/out/opengl')
-rw-r--r-- | video/out/opengl/context_angle.c | 15 |
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); |