diff options
author | Marc-André Lureau | 2021-01-25 12:10:36 +0100 |
---|---|---|
committer | Marc-André Lureau | 2021-12-21 07:50:21 +0100 |
commit | ac32b2fff127843355b4f7e7ac9f93dd4a395adf (patch) | |
tree | 796c3741bb0b7b985c7882a896340088d38f966c /ui/console.c | |
parent | ui: factor out qemu_console_set_display_gl_ctx() (diff) | |
download | qemu-ac32b2fff127843355b4f7e7ac9f93dd4a395adf.tar.gz qemu-ac32b2fff127843355b4f7e7ac9f93dd4a395adf.tar.xz qemu-ac32b2fff127843355b4f7e7ac9f93dd4a395adf.zip |
ui: associate GL context outside of display listener registration
Consoles can have an associated GL context, without listeners (they may
be added or removed later on).
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Acked-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/console.c')
-rw-r--r-- | ui/console.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/console.c b/ui/console.c index 7b83e6cdea..87f897e46d 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) { |