aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJaroslav Hensl <emulator@emulace.cz>2023-05-12 14:26:02 +0200
committerJaroslav Hensl <emulator@emulace.cz>2023-05-12 14:26:02 +0200
commitf94e063607454180284f32d88e01e0bc998e460b (patch)
treeb4274d6a88a8f39375c93df1b8dc44837071b1f0
parentc754b4716dc6057df15ad7d4b391d418cb8e7cc8 (diff)
downloadvmdisp9x-f94e063607454180284f32d88e01e0bc998e460b.tar.gz
SVGA3D_DEVCAP_SURFACEFMT_R5G6B5 guessingv1.2023.0.4
-rw-r--r--control.c8
-rw-r--r--makefile4
2 files changed, 10 insertions, 2 deletions
diff --git a/control.c b/control.c
index dedec69..f8e2d24 100644
--- a/control.c
+++ b/control.c
@@ -172,6 +172,13 @@ uint32_t FixDevCap(uint32_t cap_id, uint32_t cap_val)
switch(cap_id)
{
case SVGA3D_DEVCAP_SURFACEFMT_R5G6B5:
+#ifdef CAP_R5G6B5_ALWAYS_WRONG
+ {
+ uint32_t xrgb8888 = GetDevCap(SVGA3D_DEVCAP_SURFACEFMT_X8R8G8B8);
+ xrgb8888 &= ~SVGA3DFORMAT_OP_SRGBWRITE; /* nvidia */
+ return xrgb8888;
+ }
+#else
if(cap_val & SVGA3DFORMAT_OP_SAME_FORMAT_UP_TO_ALPHA_RENDERTARGET) /* VirtualBox BUG */
{
uint32_t xrgb8888 = GetDevCap(SVGA3D_DEVCAP_SURFACEFMT_X8R8G8B8);
@@ -188,6 +195,7 @@ uint32_t FixDevCap(uint32_t cap_id, uint32_t cap_val)
return xrgb8888;
}
}
+#endif
break;
}
diff --git a/makefile b/makefile
index af55d7b..2c8d4a3 100644
--- a/makefile
+++ b/makefile
@@ -6,9 +6,9 @@ OBJS = dibthunk.obj dibcall.obj enable.obj init.obj palette.obj &
INCS = -I$(%WATCOM)\h\win -Iddk -Ivmware
-VER_BUILD = 3
+VER_BUILD = 4
-FLAGS = -DDRV_VER_BUILD=$(VER_BUILD)
+FLAGS = -DDRV_VER_BUILD=$(VER_BUILD) -DCAP_R5G6B5_ALWAYS_WRONG
# Define HWBLT if BitBlt can be accelerated.
#FLAGS += -DHWBLT