From b7b92935df0e309149c042d587e4764548f10608 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sat, 9 Mar 2013 13:04:47 -0500 Subject: vgabios: Fix cirrus memory clear on mode switch. The cirrus_clear_vram() code wasn't actually doing anything because of a u8 overflow. Fix that. Fill with 0xff when performing a legacy cirrus mode switch (WinXP has been observed to incorrectly render dialog boxes if the memory is filled to 0). This was the behavior of the original LGPL vgabios code. To support this, add mechanism (MF_LEGACY) to allow vga drivers to detect if the mode switch is from vesa or int10. Signed-off-by: Kevin O'Connor --- vgasrc/vgabios.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vgasrc/vgabios.c') diff --git a/vgasrc/vgabios.c b/vgasrc/vgabios.c index 6abe6395..987a2594 100644 --- a/vgasrc/vgabios.c +++ b/vgasrc/vgabios.c @@ -420,7 +420,7 @@ handle_1000(struct bregs *regs) else regs->al = 0x30; - int flags = GET_BDA(modeset_ctl) & (MF_NOPALETTE|MF_GRAYSUM); + int flags = MF_LEGACY | (GET_BDA(modeset_ctl) & (MF_NOPALETTE|MF_GRAYSUM)); if (regs->al & 0x80) flags |= MF_NOCLEARMEM; -- cgit