mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
4f41814991
commit
ac32b2fff1
5 changed files with 15 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue