diff --git a/src/hardware/vga_attr.cpp b/src/hardware/vga_attr.cpp index adbf4b45..95c3c810 100644 --- a/src/hardware/vga_attr.cpp +++ b/src/hardware/vga_attr.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: vga_attr.cpp,v 1.26 2007-10-13 16:34:06 c2woody Exp $ */ +/* $Id: vga_attr.cpp,v 1.27 2007-12-23 16:00:53 c2woody Exp $ */ #include "dosbox.h" #include "inout.h" @@ -84,13 +84,15 @@ void write_p3c0(Bitu port,Bitu val,Bitu iolen) { if ((attr(mode_control) ^ val) & 0x08) { VGA_SetBlinking(val & 0x8); } - /* - Special hacks for games programming registers themselves, - Doesn't work if they program EGA16 themselves, - but haven't encountered that yet - */ - attr(mode_control)=val; - VGA_DetermineMode(); + if ((attr(mode_control) ^ val) & 0x04) { + attr(mode_control)=val; + VGA_DetermineMode(); + if ((IS_VGA_ARCH) && (svgaCard==SVGA_None)) VGA_StartResize(); + } else { + attr(mode_control)=val; + VGA_DetermineMode(); + } + /* 0 Graphics mode if set, Alphanumeric mode else. 1 Monochrome mode if set, color mode else. diff --git a/src/hardware/vga_seq.cpp b/src/hardware/vga_seq.cpp index 85207ee7..8e979ede 100644 --- a/src/hardware/vga_seq.cpp +++ b/src/hardware/vga_seq.cpp @@ -16,6 +16,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* $Id: vga_seq.cpp,v 1.21 2007-12-23 16:00:53 c2woody Exp $ */ + #include "dosbox.h" #include "inout.h" #include "vga.h" @@ -38,10 +40,13 @@ void write_p3c5(Bitu port,Bitu val,Bitu iolen) { break; case 1: /* Clocking Mode */ if (val!=seq(clocking_mode)) { - seq(clocking_mode)=val; // don't resize if only the screen off bit was changed - if ((val&(~0x20))!=(seq(clocking_mode)&(~0x20))) + if ((val&(~0x20))!=(seq(clocking_mode)&(~0x20))) { + seq(clocking_mode)=val; VGA_StartResize(); + } else { + seq(clocking_mode)=val; + } } /* TODO Figure this out :) 0 If set character clocks are 8 dots wide, else 9.