[PATCH weston 6/9] clients/simple-egl: use weston_check_extension over strstr

Emil Velikov emil.l.velikov at gmail.com
Mon Jul 4 14:34:21 UTC 2016


From: Emil Velikov <emil.velikov at collabora.com>

Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
 clients/simple-egl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clients/simple-egl.c b/clients/simple-egl.c
index d5a2660..0214b2d 100644
--- a/clients/simple-egl.c
+++ b/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_extension(extensions, "EGL_EXT_swap_buffers_with_damage") &&
+	    weston_check_extension(extensions, "EGL_EXT_buffer_age"))
 		display->swap_buffers_with_damage =
 			(PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC)
 			eglGetProcAddress("eglSwapBuffersWithDamageEXT");
-- 
2.8.2



More information about the wayland-devel mailing list