render / rpms / qemu

Forked from rpms/qemu 10 months ago
Clone

Blame qemu-fix-text-mode-screendumps.patch

cd9d16
diff -rup qemu-kvm-0.15.1/hw/vga.c frob/hw/vga.c
cd9d16
--- qemu-kvm-0.15.1/hw/vga.c	2011-10-19 09:54:48.000000000 -0400
cd9d16
+++ frob/hw/vga.c	2012-07-29 21:00:27.389677588 -0400
cd9d16
@@ -149,7 +149,7 @@ static uint16_t expand2[256];
cd9d16
 static uint8_t expand4to8[16];
cd9d16
 
cd9d16
 static void vga_screen_dump(void *opaque, const char *filename);
cd9d16
-static char *screen_dump_filename;
cd9d16
+static const char *screen_dump_filename;
cd9d16
 static DisplayChangeListener *screen_dump_dcl;
cd9d16
 
cd9d16
 static void vga_dumb_update_retrace_info(VGACommonState *s)
cd9d16
@@ -2330,7 +2330,6 @@ static void vga_save_dpy_update(DisplayS
cd9d16
 {
cd9d16
     if (screen_dump_filename) {
cd9d16
         ppm_save(screen_dump_filename, ds->surface);
cd9d16
-        screen_dump_filename = NULL;
cd9d16
     }
cd9d16
 }
cd9d16
 
cd9d16
@@ -2408,8 +2407,8 @@ static void vga_screen_dump(void *opaque
cd9d16
     if (!screen_dump_dcl)
cd9d16
         screen_dump_dcl = vga_screen_dump_init(s->ds);
cd9d16
 
cd9d16
-    screen_dump_filename = (char *)filename;
cd9d16
+    screen_dump_filename = filename;
cd9d16
     vga_invalidate_display(s);
cd9d16
     vga_hw_update();
cd9d16
+    screen_dump_filename = NULL;
cd9d16
 }
cd9d16
-