diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-02-16 19:33:37 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2022-03-14 15:16:01 +0400 |
commit | a62c4a178fb154a3b810870502cb4c63a6b4cf28 (patch) | |
tree | c548b0ce1df3ec573a03a2335e8d17fd04289084 /ui/console.c | |
parent | 398d1c91ed58fb7fe3dd3e9596519678c816bb69 (diff) |
ui/console: move dcl compatiblity check to a callback
As expected from the "compatible_dcl" comment, a simple comparison of
ops isn't enough. The following patch will fix a regression introduced
by this limited check by extending the compatibility callback for
egl-headless.
For now, this patch simply replaces the the "compatible_dcl" ops pointer
with a "dpy_gl_ctx_is_compatible_ctx" callback.
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 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/console.c b/ui/console.c index 57e431d9e6..c931855287 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1482,7 +1482,8 @@ static bool dpy_compatible_with(QemuConsole *con, flags = con->hw_ops->get_flags ? con->hw_ops->get_flags(con->hw) : 0; - if (console_has_gl(con) && con->gl->ops->compatible_dcl != dcl->ops) { + if (console_has_gl(con) && + !con->gl->ops->dpy_gl_ctx_is_compatible_dcl(con->gl, dcl)) { error_setg(errp, "Display %s is incompatible with the GL context", dcl->ops->dpy_name); return false; |