qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] vga: Fix text mode screendumps


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] vga: Fix text mode screendumps
Date: Fri, 23 Sep 2011 09:43:54 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110516 Lightning/1.0b2 Thunderbird/3.1.10

On 09/15/2011 05:47 PM, Jan Kiszka wrote:
From: Jan Kiszka<address@hidden>

In text mode, even a full refresh of the screen takes multiple updates.
As we reset the dump file pointer after the first call, we only wrote
the first line.

Signed-off-by: Jan Kiszka<address@hidden>

Applied.  Thanks.

Regards,

Anthony Liguori

---
  hw/vga.c |    7 +++----
  1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/hw/vga.c b/hw/vga.c
index 0a0c5a6..f9a6014 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -149,7 +149,7 @@ static uint16_t expand2[256];
  static uint8_t expand4to8[16];

  static void vga_screen_dump(void *opaque, const char *filename);
-static char *screen_dump_filename;
+static const char *screen_dump_filename;
  static DisplayChangeListener *screen_dump_dcl;

  static void vga_update_memory_access(VGACommonState *s)
@@ -2319,7 +2319,6 @@ static void vga_save_dpy_update(DisplayState *ds,
  {
      if (screen_dump_filename) {
          ppm_save(screen_dump_filename, ds->surface);
-        screen_dump_filename = NULL;
      }
  }

@@ -2397,8 +2396,8 @@ static void vga_screen_dump(void *opaque, const char 
*filename)
      if (!screen_dump_dcl)
          screen_dump_dcl = vga_screen_dump_init(s->ds);

-    screen_dump_filename = (char *)filename;
+    screen_dump_filename = filename;
      vga_invalidate_display(s);
      vga_hw_update();
+    screen_dump_filename = NULL;
  }
-






reply via email to

[Prev in Thread] Current Thread [Next in Thread]