mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-26 06:35:58 +01:00
render/gles2: only call wlr_egl_bind_display if supported
This allows us to hard-fail if the extension is advertised but we fail to enable it.
This commit is contained in:
parent
9acca4fc73
commit
4a1015faff
1 changed files with 8 additions and 3 deletions
|
@ -355,10 +355,15 @@ static bool gles2_init_wl_display(struct wlr_renderer *wlr_renderer,
|
||||||
struct wl_display *wl_display) {
|
struct wl_display *wl_display) {
|
||||||
struct wlr_gles2_renderer *renderer =
|
struct wlr_gles2_renderer *renderer =
|
||||||
gles2_get_renderer(wlr_renderer);
|
gles2_get_renderer(wlr_renderer);
|
||||||
|
|
||||||
|
if (renderer->egl->exts.bind_wayland_display_wl) {
|
||||||
if (!wlr_egl_bind_display(renderer->egl, wl_display)) {
|
if (!wlr_egl_bind_display(renderer->egl, wl_display)) {
|
||||||
wlr_log(WLR_INFO, "failed to bind wl_display to EGL");
|
wlr_log(WLR_ERROR, "Failed to bind wl_display to EGL");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
wlr_log(WLR_INFO, "EGL_WL_bind_wayland_display is not supported");
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue