fix screendump

Commit 45efb16124 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: Avi Kivity <avi@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Alon Levy <alevy@redhat.com>
Tested-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
Gerd Hoffmann 2012-03-01 08:34:40 +01:00 committed by Blue Swirl
parent bc09845431
commit 08c4ea294f
3 changed files with 4 additions and 7 deletions

View file

@ -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);
}