From ac32b2fff127843355b4f7e7ac9f93dd4a395adf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 25 Jan 2021 15:10:36 +0400 Subject: ui: associate GL context outside of display listener registration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Consoles can have an associated GL context, without listeners (they may be added or removed later on). Signed-off-by: Marc-André Lureau Acked-by: Gerd Hoffmann --- ui/console.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'ui/console.c') diff --git a/ui/console.c b/ui/console.c index 7b83e6c..87f897e 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1465,8 +1465,11 @@ void register_displaychangelistener(DisplayChangeListener *dcl) assert(!dcl->ds); - if (dcl->ops->dpy_gl_ctx_create) { - qemu_console_set_display_gl_ctx(dcl->con, dcl); + if (dcl->con && dcl->con->gl && + dcl->con->gl != dcl) { + error_report("Display %s is incompatible with the GL context", + dcl->ops->dpy_name); + exit(1); } if (dcl->con) { -- cgit v1.1