aboutsummaryrefslogtreecommitdiffstats
path: root/control.c
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 /control.c
parentc754b4716dc6057df15ad7d4b391d418cb8e7cc8 (diff)
downloadvmdisp9x-f94e063607454180284f32d88e01e0bc998e460b.tar.gz
SVGA3D_DEVCAP_SURFACEFMT_R5G6B5 guessingv1.2023.0.4
Diffstat (limited to 'control.c')
-rw-r--r--control.c8
1 files changed, 8 insertions, 0 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;
}