Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
ui/vc: use common text console surface creation
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20230830093843.3531473-35-marcandre.lureau@redhat.com>
  • Loading branch information
elmarco committed Sep 4, 2023
1 parent 6ce7b1f commit 742a689
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions ui/console.c
Expand Up @@ -2569,18 +2569,13 @@ static void vc_chr_open(Chardev *chr,
height = qemu_console_get_height(NULL, 24 * FONT_HEIGHT);
} else {
s = QEMU_TEXT_CONSOLE(object_new(TYPE_QEMU_FIXED_TEXT_CONSOLE));
QEMU_CONSOLE(s)->scanout.kind = SCANOUT_SURFACE;
QEMU_CONSOLE(s)->surface = qemu_create_displaysurface(width, height);
}

dpy_gfx_replace_surface(QEMU_CONSOLE(s), qemu_create_displaysurface(width, height));

s->chr = chr;
drv->console = s;

if (QEMU_CONSOLE(s)->scanout.kind != SCANOUT_SURFACE) {
QEMU_CONSOLE(s)->surface = qemu_create_displaysurface(width, height);
QEMU_CONSOLE(s)->scanout.kind = SCANOUT_SURFACE;
}

/* set current text attributes to default */
drv->t_attrib = TEXT_ATTRIBUTES_DEFAULT;
text_console_resize(s);
Expand Down

0 comments on commit 742a689

Please sign in to comment.