diff options
Diffstat (limited to 'hw/display/blizzard.c')
-rw-r--r-- | hw/display/blizzard.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/hw/display/blizzard.c b/hw/display/blizzard.c index de7ccf8..1ca3355 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 @@ -956,6 +944,11 @@ static void blizzard_screen_dump(void *opaque, const char *filename, #define DEPTH 32 #include "blizzard_template.h" +static const GraphicHwOps blizzard_ops = { + .invalidate = blizzard_invalidate_display, + .gfx_update = blizzard_update_display, +}; + void *s1d13745_init(qemu_irq gpio_int) { BlizzardState *s = (BlizzardState *) g_malloc0(sizeof(*s)); @@ -963,9 +956,7 @@ void *s1d13745_init(qemu_irq gpio_int) s->fb = g_malloc(0x180000); - s->con = graphic_console_init(blizzard_update_display, - blizzard_invalidate_display, - blizzard_screen_dump, NULL, s); + s->con = graphic_console_init(&blizzard_ops, s); surface = qemu_console_surface(s->con); switch (surface_bits_per_pixel(surface)) { |