diff options
Diffstat (limited to 'ui/console.c')
-rw-r--r-- | ui/console.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/ui/console.c b/ui/console.c index 0a68836d50..0d95f32123 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1339,11 +1339,16 @@ DisplaySurface *qemu_resize_displaysurface(DisplayState *ds, } DisplaySurface *qemu_create_displaysurface_from(int width, int height, int bpp, - int linesize, uint8_t *data) + int linesize, uint8_t *data, + bool byteswap) { DisplaySurface *surface = g_new0(DisplaySurface, 1); - surface->pf = qemu_default_pixelformat(bpp); + if (byteswap) { + surface->pf = qemu_different_endianness_pixelformat(bpp); + } else { + surface->pf = qemu_default_pixelformat(bpp); + } surface->format = qemu_pixman_get_format(&surface->pf); assert(surface->format != 0); @@ -1532,7 +1537,7 @@ static void text_console_do_init(CharDriverState *chr, DisplayState *ds) chr->init(chr); } -CharDriverState *text_console_init(QemuOpts *opts) +static CharDriverState *text_console_init(QemuOpts *opts) { CharDriverState *chr; QemuConsole *s; @@ -1568,6 +1573,18 @@ CharDriverState *text_console_init(QemuOpts *opts) return chr; } +static VcHandler *vc_handler = text_console_init; + +CharDriverState *vc_init(QemuOpts *opts) +{ + return vc_handler(opts); +} + +void register_vc_handler(VcHandler *handler) +{ + vc_handler = handler; +} + void text_consoles_set_display(DisplayState *ds) { int i; |