mirror of
https://github.com/mpv-player/mpv
synced 2024-09-09 01:16:56 +02:00
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.
This commit is contained in:
parent
e246c3f060
commit
5a6ba2a4fd
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user