diff --git a/libobs-opengl/gl-wayland-egl.c b/libobs-opengl/gl-wayland-egl.c index a28f9df58..913ca3c3a 100644 --- a/libobs-opengl/gl-wayland-egl.c +++ b/libobs-opengl/gl-wayland-egl.c @@ -190,7 +190,9 @@ static struct gl_platform *gl_wayland_egl_platform_create(gs_device_t *device, device->plat = plat; - plat->display = eglGetDisplay(plat->wl_display); + const EGLAttrib plat_attribs[] = {EGL_NONE}; + plat->display = eglGetPlatformDisplay(EGL_PLATFORM_WAYLAND_EXT, + plat->wl_display, plat_attribs); if (plat->display == EGL_NO_DISPLAY) { blog(LOG_ERROR, "eglGetDisplay failed"); goto fail_display_init; diff --git a/libobs-opengl/gl-x11-egl.c b/libobs-opengl/gl-x11-egl.c index d6b00c309..9b200d1b6 100644 --- a/libobs-opengl/gl-x11-egl.c +++ b/libobs-opengl/gl-x11-egl.c @@ -155,8 +155,9 @@ static EGLDisplay get_egl_display(struct gl_platform *plat) : NULL); if (eglGetPlatformDisplayEXT) { + const EGLint plat_attribs[] = {EGL_NONE}; edisplay = eglGetPlatformDisplayEXT(EGL_PLATFORM_X11_EXT, - display, NULL); + display, plat_attribs); if (EGL_NO_DISPLAY == edisplay) blog(LOG_ERROR, "Failed to get EGL/X11 display"); }