Revision 2c62f08d hw/display/vmware_vga.c
b/hw/display/vmware_vga.c | ||
---|---|---|
1119 | 1119 |
s->invalidated = 1; |
1120 | 1120 |
} |
1121 | 1121 |
|
1122 |
/* save the vga display in a PPM image even if no display is |
|
1123 |
available */ |
|
1124 |
static void vmsvga_screen_dump(void *opaque, const char *filename, bool cswitch, |
|
1125 |
Error **errp) |
|
1126 |
{ |
|
1127 |
struct vmsvga_state_s *s = opaque; |
|
1128 |
DisplaySurface *surface = qemu_console_surface(s->vga.con); |
|
1129 |
|
|
1130 |
if (!s->enable) { |
|
1131 |
s->vga.screen_dump(&s->vga, filename, cswitch, errp); |
|
1132 |
return; |
|
1133 |
} |
|
1134 |
|
|
1135 |
if (surface_bits_per_pixel(surface) == 32) { |
|
1136 |
DisplaySurface *ds = qemu_create_displaysurface_from( |
|
1137 |
surface_width(surface), |
|
1138 |
surface_height(surface), |
|
1139 |
32, |
|
1140 |
surface_stride(surface), |
|
1141 |
s->vga.vram_ptr, false); |
|
1142 |
ppm_save(filename, ds, errp); |
|
1143 |
g_free(ds); |
|
1144 |
} |
|
1145 |
} |
|
1146 |
|
|
1147 | 1122 |
static void vmsvga_text_update(void *opaque, console_ch_t *chardata) |
1148 | 1123 |
{ |
1149 | 1124 |
struct vmsvga_state_s *s = opaque; |
... | ... | |
1212 | 1187 |
|
1213 | 1188 |
s->vga.con = graphic_console_init(vmsvga_update_display, |
1214 | 1189 |
vmsvga_invalidate_display, |
1215 |
vmsvga_screen_dump, |
|
1216 | 1190 |
vmsvga_text_update, s); |
1217 | 1191 |
|
1218 | 1192 |
s->fifo_size = SVGA_FIFO_SIZE; |
Also available in: Unified diff