Donald...

thanks... I actually posted a patch to fix this sometime ago, but your patch seems more thorough and probably more correct. Just FYI, I attached my patch again. I will test your patch as well.

Thanks again,

Leo Reiter

Donald D. Dugger wrote:
If you change the video resolution while running a Windows XP image such that
it uses fewer bytes of VRAM (either by using fewer bytes per pixel or by
lowering the resolution) then some window backgrounds will become corrupted.
This happens because the Windows XP Cirrus Logic driver assumes that VRAM is
initialized to 0xff whenever the video mode switches between VGA and SVGA.

This patch fixes this problem by resetting VRAM whenever a VGA/SVGA mode switch
occurs.

Signed-off-by: [EMAIL PROTECTED]


--
Leonardo E. Reiter
Vice President of Product Development, CTO

Win4Lin, Inc.
Virtual Computing that means Business
Main: +1 512 339 7979
Fax: +1 512 532 6501
http://www.win4lin.com
Index: hw/vga.c
===================================================================
RCS file: /cvsroot/qemu/qemu/hw/vga.c,v
retrieving revision 1.42
diff -a -u -r1.42 vga.c
--- hw/vga.c	9 Apr 2006 01:06:34 -0000	1.42
+++ hw/vga.c	12 Apr 2006 14:53:06 -0000
@@ -1366,6 +1366,8 @@
 
     if (disp_width != s->last_width ||
         height != s->last_height) {
+        if (cirrus_vga_enabled && s->get_bpp(s) >= 8)
+            memset(s->vram_ptr, 0xff, s->vram_size);
         dpy_resize(s->ds, disp_width, height);
         s->last_scr_width = disp_width;
         s->last_scr_height = height;
_______________________________________________
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel

Reply via email to