diff options
author | Jaroslav Hensl <jara@hensl.cz> | 2024-12-01 14:45:38 +0100 |
---|---|---|
committer | Jaroslav Hensl <jara@hensl.cz> | 2024-12-01 14:45:38 +0100 |
commit | 3cd2c05f47e08a1364589638fa0f8bbcc50f14d1 (patch) | |
tree | 14a96f4186c5174d153e14b43c44481474603868 | |
parent | e1619890b60bf83a7e0a28c3e038589208d76a72 (diff) | |
download | vmdisp9x-3cd2c05f47e08a1364589638fa0f8bbcc50f14d1.tar.gz |
clear surface on mode change
-rw-r--r-- | makefile | 2 | ||||
-rw-r--r-- | vxd_svga.c | 16 | ||||
-rw-r--r-- | vxd_vbe.c | 7 |
3 files changed, 24 insertions, 1 deletions
@@ -12,7 +12,7 @@ OBJS += & INCS = -I$(%WATCOM)\h\win -Iddk -Ivmware
-VER_BUILD = 88
+VER_BUILD = 91
FLAGS = -DDRV_VER_BUILD=$(VER_BUILD)
@@ -841,6 +841,20 @@ static void SVGA_setmode_phy(DWORD w, DWORD h, DWORD bpp) SVGA_Flush_CB();
}
+/* clear both physical screen and system surface */
+void SVGA_clear()
+{
+ if(hda->system_surface)
+ {
+ memset((BYTE*)hda->vram_pm32 + hda->system_surface, 0, hda->height*hda->pitch);
+ memset(hda->vram_pm32, 0, SVGA_pitch(hda->width, 32)*hda->height);
+ }
+ else
+ {
+ memset(hda->vram_pm32, 0, hda->height*hda->pitch);
+ }
+}
+
/**
* Set display mode
*
@@ -933,6 +947,8 @@ BOOL SVGA_setmode(DWORD w, DWORD h, DWORD bpp) SVGA_DefineGMRFB();
}
+ SVGA_clear();
+
mouse_invalidate();
FBHDA_access_end(0);
@@ -204,6 +204,11 @@ BOOL VBE_validmode(DWORD w, DWORD h, DWORD bpp) return FALSE;
}
+void VBE_clear()
+{
+ memset(hda->vram_pm32, 0, hda->pitch*hda->height);
+}
+
BOOL VBE_setmode(DWORD w, DWORD h, DWORD bpp)
{
if(!VBE_validmode(w, h, bpp)) return FALSE;
@@ -262,6 +267,8 @@ BOOL VBE_setmode(DWORD w, DWORD h, DWORD bpp) hda->pitch = VBE_pitch(w, bpp);
hda->stride = h * hda->pitch;
hda->surface = 0;
+
+ VBE_clear();
mouse_invalidate();
|