From: Marc-André Lureau Date: Wed, 30 Aug 2023 09:37:41 +0000 (+0400) Subject: ui/console: call dpy_gfx_update() regardless of have_gfx X-Git-Tag: v8.2.0-rc0~142^2~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc9b8bc93cafee6f3c9f73ef5e8a7379004e8699;p=thirdparty%2Fqemu.git ui/console: call dpy_gfx_update() regardless of have_gfx The function will handle the case when no listeners are gfx, without extra meaningful cost. This allows to get rid of DisplayState dependency in VC implementation. Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé Message-Id: <20230830093843.3531473-8-marcandre.lureau@redhat.com> --- diff --git a/ui/console.c b/ui/console.c index 14717a6f4dc..2bc4c153dec 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1087,7 +1087,7 @@ static int vc_chr_write(Chardev *chr, const uint8_t *buf, int len) console_putchar(s, buf[i]); } console_show_cursor(s, 1); - if (s->ds->have_gfx && s->update_x0 < s->update_x1) { + if (s->update_x0 < s->update_x1) { dpy_gfx_update(s, s->update_x0, s->update_y0, s->update_x1 - s->update_x0, s->update_y1 - s->update_y0);