mirror of
https://github.com/obsproject/obs-studio.git
synced 2024-06-30 08:33:32 +00:00
libobs-opengl: Specify display attributes
This is functionally a no-op, but works around a driver bug that prevents use of eglQueryDisplayAttribEXT. This makes us more likely to not trigger the driver bug and that gs_enum_adapters works correctly.
This commit is contained in:
parent
b6e2face96
commit
d2e50c8c38
|
@ -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;
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue