Skip to content

Commit

Permalink
ui/console: when PIXMAN is unavailable, don't draw placeholder msg
Browse files Browse the repository at this point in the history
When we can't draw text, simply show a blank display.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
  • Loading branch information
elmarco committed Nov 7, 2023
1 parent a200d53 commit d7e9479
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,7 @@ DisplaySurface *qemu_create_placeholder_surface(int w, int h,
const char *msg)
{
DisplaySurface *surface = qemu_create_displaysurface(w, h);
#ifdef CONFIG_PIXMAN
pixman_color_t bg = QEMU_PIXMAN_COLOR_BLACK;
pixman_color_t fg = QEMU_PIXMAN_COLOR_GRAY;
pixman_image_t *glyph;
Expand All @@ -598,6 +599,7 @@ DisplaySurface *qemu_create_placeholder_surface(int w, int h,
x+i, y, FONT_WIDTH, FONT_HEIGHT);
qemu_pixman_image_unref(glyph);
}
#endif
surface->flags |= QEMU_PLACEHOLDER_FLAG;
return surface;
}
Expand Down

0 comments on commit d7e9479

Please sign in to comment.