clients/nested: use weston_check_egl_extension over strstr

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
dev
Emil Velikov 8 years ago committed by Daniel Stone
parent d0fcdc955e
commit ce5b614c80
  1. 4
      clients/nested.c

@ -748,7 +748,7 @@ nested_init_compositor(struct nested *nested)
nested->egl_display = display_get_egl_display(nested->display); nested->egl_display = display_get_egl_display(nested->display);
extensions = eglQueryString(nested->egl_display, EGL_EXTENSIONS); extensions = eglQueryString(nested->egl_display, EGL_EXTENSIONS);
if (strstr(extensions, "EGL_WL_bind_wayland_display") == NULL) { if (weston_check_egl_extension(extensions, "EGL_WL_bind_wayland_display") == NULL) {
fprintf(stderr, "no EGL_WL_bind_wayland_display extension\n"); fprintf(stderr, "no EGL_WL_bind_wayland_display extension\n");
return -1; return -1;
} }
@ -771,7 +771,7 @@ nested_init_compositor(struct nested *nested)
const char *func = "eglCreateWaylandBufferFromImageWL"; const char *func = "eglCreateWaylandBufferFromImageWL";
const char *ext = "EGL_WL_create_wayland_buffer_from_image"; const char *ext = "EGL_WL_create_wayland_buffer_from_image";
if (strstr(extensions, ext)) { if (weston_check_egl_extension(extensions, ext)) {
create_wayland_buffer_from_image = create_wayland_buffer_from_image =
(void *) eglGetProcAddress(func); (void *) eglGetProcAddress(func);
use_ss_renderer = 1; use_ss_renderer = 1;

Loading…
Cancel
Save