You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-04-13 14:42:51 -07:00
Added patch to properly initialize caps->dwZBufferBitDepths in ddraw7_GetCaps.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
From 64f08bf065be9b766dce1c52a0be260dc1e26679 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sun, 6 Sep 2015 20:21:42 +0200
|
||||
Subject: ddraw: Set dwZBufferBitDepth in ddraw7_GetCaps.
|
||||
|
||||
---
|
||||
dlls/ddraw/ddraw.c | 24 ++++++++++++++++++++++++
|
||||
1 file changed, 24 insertions(+)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index c94bfee..77a1bea 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -1420,6 +1420,28 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps)
|
||||
return DD_OK;
|
||||
}
|
||||
|
||||
+HRESULT CALLBACK enum_zbuffer(DDPIXELFORMAT *format, void *ctx)
|
||||
+{
|
||||
+ DDCAPS *caps = ctx;
|
||||
+
|
||||
+ switch (format->u1.dwZBufferBitDepth)
|
||||
+ {
|
||||
+ case 8:
|
||||
+ caps->dwZBufferBitDepths |= DDBD_8;
|
||||
+ break;
|
||||
+ case 16:
|
||||
+ caps->dwZBufferBitDepths |= DDBD_16;
|
||||
+ break;
|
||||
+ case 24:
|
||||
+ caps->dwZBufferBitDepths |= DDBD_24;
|
||||
+ break;
|
||||
+ case 32:
|
||||
+ caps->dwZBufferBitDepths |= DDBD_32;
|
||||
+ break;
|
||||
+ }
|
||||
+ return D3DENUMRET_OK;
|
||||
+}
|
||||
+
|
||||
/*****************************************************************************
|
||||
* IDirectDraw7::GetCaps
|
||||
*
|
||||
@@ -1500,6 +1522,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
|
||||
caps.dwCaps |= DDCAPS_ALIGNSTRIDE;
|
||||
caps.dwAlignStrideAlign = DDRAW_STRIDE_ALIGNMENT;
|
||||
|
||||
+ IDirect3D7_EnumZBufferFormats(&ddraw->IDirect3D7_iface, &IID_IDirect3DHALDevice, enum_zbuffer, &caps);
|
||||
+
|
||||
if(DriverCaps)
|
||||
{
|
||||
DD_STRUCT_COPY_BYSIZE(DriverCaps, &caps);
|
||||
--
|
||||
2.5.1
|
||||
|
1
patches/ddraw-ZBufferBitDepths/definition
Normal file
1
patches/ddraw-ZBufferBitDepths/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: [27002] Properly initialize caps->dwZBufferBitDepths in ddraw7_GetCaps
|
Reference in New Issue
Block a user