From: Peter Maydell Date: Wed, 31 Jul 2024 15:41:35 +0000 (+0100) Subject: system/vl.c: Expand OpenGL related errors X-Git-Tag: qemu-xen-4.20.0~30^2~5 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7aea035a60eec599c487d71659fdb5102b69cfb9;p=qemu-xen.git system/vl.c: Expand OpenGL related errors Expand the OpenGL related error messages we produce for various "OpenGL not present/not supported" cases, to hopefully guide the user towards how to fix things. Now if the user tries to enable GL on a backend that doesn't support it the error message is a bit more precise: $ qemu-system-aarch64 -M virt -device virtio-gpu-gl -display curses,gl=on qemu-system-aarch64: OpenGL is not supported by display backend 'curses' Signed-off-by: Peter Maydell Acked-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé [AJB: Improved error report message] Reviewed-by: Alex Bennée Message-ID: <20240731154136.3494621-3-peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé --- diff --git a/system/vl.c b/system/vl.c index 9e8f16f155..41d53d2456 100644 --- a/system/vl.c +++ b/system/vl.c @@ -1973,9 +1973,10 @@ static void qemu_create_early_backends(void) if (dpy.has_gl && dpy.gl != DISPLAYGL_MODE_OFF && display_opengl == 0) { #if defined(CONFIG_OPENGL) - error_report("OpenGL is not supported by the display"); + error_report("OpenGL is not supported by display backend '%s'", + DisplayType_str(dpy.type)); #else - error_report("OpenGL support is disabled"); + error_report("OpenGL support was not enabled in this build of QEMU"); #endif exit(1); }