static void vmsvga_screen_dump(void *opaque, const char *filename, bool cswitch,

                               Error **errp)

{

    struct vmsvga_state_s *s = opaque;

    DisplaySurface *surface = qemu_console_surface(s->vga.con);



    if (!s->enable) {

        s->vga.screen_dump(&s->vga, filename, cswitch, errp);

        return;

    }



    if (surface_bits_per_pixel(surface) == 32) {

        DisplaySurface *ds = qemu_create_displaysurface_from(

                                 surface_width(surface),

                                 surface_height(surface),

                                 32,

                                 surface_stride(surface),

                                 s->vga.vram_ptr, false);

        ppm_save(filename, ds, errp);

        g_free(ds);

    }

}

static void vmsvga_screen_dump(void *opaque, const char *filename, bool cswitch,

                               Error **errp)

{

    struct vmsvga_state_s *s = opaque;

    DisplaySurface *surface = qemu_console_surface(s->vga.con);



    if (!s->enable) {

        s->vga.screen_dump(&s->vga, filename, cswitch, errp);

        return;

    }



    if (surface_bits_per_pixel(surface) == 32) {

        DisplaySurface *ds = qemu_create_displaysurface_from(

                                 surface_width(surface),

                                 surface_height(surface),

                                 32,

                                 surface_stride(surface),

                                 s->vga.vram_ptr, false);

        ppm_save(filename, ds, errp);

        g_free(ds);

    }

}

static void FUNC_0(void *VAR_0, const char *VAR_1, bool VAR_2,

                               Error **VAR_3)

{

    struct vmsvga_state_s *VAR_4 = VAR_0;

    DisplaySurface *surface = qemu_console_surface(VAR_4->vga.con);



    if (!VAR_4->enable) {

        VAR_4->vga.screen_dump(&VAR_4->vga, VAR_1, VAR_2, VAR_3);

        return;

    }



    if (surface_bits_per_pixel(surface) == 32) {

        DisplaySurface *ds = qemu_create_displaysurface_from(

                                 surface_width(surface),

                                 surface_height(surface),

                                 32,

                                 surface_stride(surface),

                                 VAR_4->vga.vram_ptr, false);

        ppm_save(VAR_1, ds, VAR_3);

        g_free(ds);

    }

}

static void FUNC_0(void *VAR_0, const char *VAR_1, bool VAR_2,
Error **VAR_3)
{ struct vmsvga_state_s *VAR_4 = VAR_0; DisplaySurface *surface = qemu_console_surface(VAR_4->vga.con); if (!VAR_4->enable) { VAR_4->vga.screen_dump(&VAR_4->vga, VAR_1, VAR_2, VAR_3); return; } if (surface_bits_per_pixel(surface) == 32) { DisplaySurface *ds = qemu_create_displaysurface_from(
surface_width(surface),
surface_height(surface),
32,
surface_stride(surface),
VAR_4->vga.vram_ptr, false); ppm_save(VAR_1, ds, VAR_3); g_free(ds); } }