From fa6ae44719aff32e8b6ce794d75f78a8e91c9063 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Tue, 3 Aug 2021 14:55:26 +0100 Subject: [PATCH] backend-headless: Fix pointer vs. int confusion with EGL EGL's native display type is not particularly well defined; in gl-renderer we get around this by always treating it as a void *, since for all the platforms we care about it's a pointer - gbm_device, wl_display, or Display *. The surfaceless platform doesn't care what the native display is (since it doesn't have one by definition), so just use NULL instead of what may be either NULL or 0 depending on environmental factors. Signed-off-by: Daniel Stone --- libweston/backend-headless/headless.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libweston/backend-headless/headless.c b/libweston/backend-headless/headless.c index a99ac3f1..5c4e4ccb 100644 --- a/libweston/backend-headless/headless.c +++ b/libweston/backend-headless/headless.c @@ -399,7 +399,7 @@ headless_gl_renderer_init(struct headless_backend *b) { const struct gl_renderer_display_options options = { .egl_platform = EGL_PLATFORM_SURFACELESS_MESA, - .egl_native_display = EGL_DEFAULT_DISPLAY, + .egl_native_display = NULL, .egl_surface_type = EGL_PBUFFER_BIT, .drm_formats = headless_formats, .drm_formats_count = ARRAY_LENGTH(headless_formats),