fix screendump (Stefano Stabellini)

this patch fixes the screendump functionality that was recently broken;
it must be applied *after* PATCH 5, 6 and 7 of the original displaystate
change patch series.
In fact the other patches make much easier to solve the screendump
problem because they make the console switching mechanism more robust.

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>



git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6345 c046a42c-6fe2-441c-8c8c-71466251a162
diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
index 5b60074..950a98c 100644
--- a/hw/vmware_vga.c
+++ b/hw/vmware_vga.c
@@ -975,7 +975,10 @@
     }
 
     if (s->depth == 32) {
-        ppm_save(filename, s->vram, s->width, s->height, ds_get_linesize(s->ds));
+        DisplaySurface *ds = qemu_create_displaysurface_from(s->width,
+                s->height, 32, ds_get_linesize(s->ds), s->vram);
+        ppm_save(filename, ds);
+        qemu_free(ds);
     }
 }