From 2c62f08ddbf3fa80dc7202eb9a2ea60ae44e2cc5 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 12 Mar 2013 14:48:31 +0100 Subject: console: simplify screendump Screendumps are alot simpler as we can update non-active QemuConsoles now. So we only need to update the QemuConsole we want write out, then dump the DisplaySurface content into a ppm file. Done. No console switching needed. No special support code in the gfx card emulation needed. Zap it all. Also move ppm_save out of the vga code and next to the qmp_screendump function. For now screen dumping is limited to console #0 (like it used to be), even though it is dead simple to extend it to other consoles. I wanna finish the console cleanup before setting new qapi interfaces into stone. Signed-off-by: Gerd Hoffmann Tested-by: Igor Mitsyanko --- hw/display/blizzard.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'hw/display/blizzard.c') diff --git a/hw/display/blizzard.c b/hw/display/blizzard.c index de7ccf87dc..70b68227fe 100644 --- a/hw/display/blizzard.c +++ b/hw/display/blizzard.c @@ -933,18 +933,6 @@ static void blizzard_update_display(void *opaque) s->my[1] = 0; } -static void blizzard_screen_dump(void *opaque, const char *filename, - bool cswitch, Error **errp) -{ - BlizzardState *s = (BlizzardState *) opaque; - DisplaySurface *surface = qemu_console_surface(s->con); - - blizzard_update_display(opaque); - if (s && surface_data(surface)) { - ppm_save(filename, surface, errp); - } -} - #define DEPTH 8 #include "blizzard_template.h" #define DEPTH 15 @@ -965,7 +953,7 @@ void *s1d13745_init(qemu_irq gpio_int) s->con = graphic_console_init(blizzard_update_display, blizzard_invalidate_display, - blizzard_screen_dump, NULL, s); + NULL, s); surface = qemu_console_surface(s->con); switch (surface_bits_per_pixel(surface)) { -- cgit v1.2.1