提交 08c4ea29 编写于 作者: G Gerd Hoffmann 提交者: Blue Swirl

fix screendump

Commit 45efb161 optimized a bit too
much.  We can skip the vga_invalidate_display() in case no console
switch happened because we don't need a full redraw then.  We can *not*
skip vga_hw_update() though, because the screen content will be stale
then in case nobody else calls vga_hw_update().

Trigger: vga textmode with vnc display and no client connected.
Reported-by: NAvi Kivity <avi@redhat.com>
Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
Reviewed-by: NAlon Levy <alevy@redhat.com>
Tested-by: NAvi Kivity <avi@redhat.com>
Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
上级 bc098454
......@@ -937,9 +937,7 @@ static void blizzard_screen_dump(void *opaque, const char *filename,
{
BlizzardState *s = (BlizzardState *) opaque;
if (cswitch) {
blizzard_update_display(opaque);
}
blizzard_update_display(opaque);
if (s && ds_get_data(s->state))
ppm_save(filename, s->state->surface);
}
......
......@@ -267,9 +267,8 @@ static int ppm_save(const char *filename, uint8_t *data,
static void omap_screen_dump(void *opaque, const char *filename, bool cswitch)
{
struct omap_lcd_panel_s *omap_lcd = opaque;
if (cswitch) {
omap_update_display(opaque);
}
omap_update_display(opaque);
if (omap_lcd && ds_get_data(omap_lcd->state))
ppm_save(filename, ds_get_data(omap_lcd->state),
omap_lcd->width, omap_lcd->height,
......
......@@ -2415,7 +2415,7 @@ static void vga_screen_dump(void *opaque, const char *filename, bool cswitch)
if (cswitch) {
vga_invalidate_display(s);
vga_hw_update();
}
vga_hw_update();
ppm_save(filename, s->ds->surface);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册