diff options
author | Manuel Bachmann <manuel.bachmann@open.eurogiciel.org> | 2015-03-29 08:17:01 +0200 |
---|---|---|
committer | Pekka Paalanen <pekka.paalanen@collabora.co.uk> | 2015-03-30 15:42:16 +0300 |
commit | 5d1d2ca32513a04f01e5f4cf938f6aa5ae513fcc (patch) | |
tree | e53a3388d1a535b410ffe7c6feb471356a12edc8 /shared | |
parent | 56d9b88e695be2f0a4ba21c9ef365483fa916427 (diff) | |
download | weston-5d1d2ca32513a04f01e5f4cf938f6aa5ae513fcc.tar.gz |
toytoolkit: fix EGL surface creation for lazy drivers
Some DRI drivers, including VMware vmwgfx, do not support
calling eglQueryString() with a EGL_NO_DISPLAY parameter.
Allow toytoolkit to create EGL surfaces with them, by
falling back to the old creation method.
Signed-off-by: Manuel Bachmann <manuel.bachmann@open.eurogiciel.org>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Diffstat (limited to 'shared')
-rw-r--r-- | shared/platform.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/shared/platform.h b/shared/platform.h index ff640b54..364ce5aa 100644 --- a/shared/platform.h +++ b/shared/platform.h @@ -55,8 +55,9 @@ weston_platform_get_egl_proc_address(const char *address) { const char *extensions = eglQueryString(EGL_NO_DISPLAY, EGL_EXTENSIONS); - if (strstr(extensions, "EGL_EXT_platform_wayland") - || strstr(extensions, "EGL_KHR_platform_wayland")) { + if (extensions + && (strstr(extensions, "EGL_EXT_platform_wayland") + || strstr(extensions, "EGL_KHR_platform_wayland"))) { return (void *) eglGetProcAddress(address); } |