mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-07 05:05:00 +00:00
shared/platform.h: use weston_check_egl_extension over strstr
The later can give false positives. Signed-off-by: Emil Velikov <emil.velikov@collabora.com> Reviewed-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
f0c3a1c112
commit
d0fcdc955e
|
@ -88,9 +88,9 @@ weston_platform_get_egl_proc_address(const char *address)
|
||||||
{
|
{
|
||||||
const char *extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
|
const char *extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS);
|
||||||
|
|
||||||
if (extensions
|
if (extensions &&
|
||||||
&& (strstr(extensions, "EGL_EXT_platform_wayland")
|
(weston_check_egl_extension(extensions, "EGL_EXT_platform_wayland") ||
|
||||||
|| strstr(extensions, "EGL_KHR_platform_wayland"))) {
|
weston_check_egl_extension(extensions, "EGL_KHR_platform_wayland"))) {
|
||||||
return (void *) eglGetProcAddress(address);
|
return (void *) eglGetProcAddress(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue