clients/simple-egl: 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 9 years ago committed by Daniel Stone
parent ce5b614c80
commit 025ad93833
  1. 4
      clients/simple-egl.c

@ -188,8 +188,8 @@ init_egl(struct display *display, struct window *window)
display->swap_buffers_with_damage = NULL;
extensions = eglQueryString(display->egl.dpy, EGL_EXTENSIONS);
if (extensions &&
strstr(extensions, "EGL_EXT_swap_buffers_with_damage") &&
strstr(extensions, "EGL_EXT_buffer_age"))
weston_check_egl_extension(extensions, "EGL_EXT_swap_buffers_with_damage") &&
weston_check_egl_extension(extensions, "EGL_EXT_buffer_age"))
display->swap_buffers_with_damage =
(PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC)
eglGetProcAddress("eglSwapBuffersWithDamageEXT");

Loading…
Cancel
Save