aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaroslav Hensl <jara@hensl.cz>2024-12-01 14:45:38 +0100
committerJaroslav Hensl <jara@hensl.cz>2024-12-01 14:45:38 +0100
commit3cd2c05f47e08a1364589638fa0f8bbcc50f14d1 (patch)
tree14a96f4186c5174d153e14b43c44481474603868
parente1619890b60bf83a7e0a28c3e038589208d76a72 (diff)
downloadvmdisp9x-3cd2c05f47e08a1364589638fa0f8bbcc50f14d1.tar.gz
clear surface on mode change
-rw-r--r--makefile2
-rw-r--r--vxd_svga.c16
-rw-r--r--vxd_vbe.c7
3 files changed, 24 insertions, 1 deletions
diff --git a/makefile b/makefile
index 6e01f98..37ec4e1 100644
--- a/makefile
+++ b/makefile
@@ -12,7 +12,7 @@ OBJS += &
INCS = -I$(%WATCOM)\h\win -Iddk -Ivmware
-VER_BUILD = 88
+VER_BUILD = 91
FLAGS = -DDRV_VER_BUILD=$(VER_BUILD)
diff --git a/vxd_svga.c b/vxd_svga.c
index f1441aa..0d77c6e 100644
--- a/vxd_svga.c
+++ b/vxd_svga.c
@@ -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);
diff --git a/vxd_vbe.c b/vxd_vbe.c
index 79f9508..4d78939 100644
--- a/vxd_vbe.c
+++ b/vxd_vbe.c
@@ -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();