mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Updated ddraw-version-check patchset
This commit is contained in:
parent
055e049821
commit
d82dea3b21
@ -1,15 +1,15 @@
|
||||
From 88412e5d16a242a1d0fed2db46ffd7ad7eb87ca8 Mon Sep 17 00:00:00 2001
|
||||
From 1171e61b81f598728dd5f242494a37dc74fb2870 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew D'Addesio <andrew@fatbag.net>
|
||||
Date: Fri, 8 Feb 2019 18:48:33 -1000
|
||||
Subject: [PATCH] ddraw: Return correct devices based off requested DirectX
|
||||
version.
|
||||
|
||||
---
|
||||
dlls/ddraw/ddraw.c | 230 +++++++++++++++++++++++++--------------------
|
||||
1 file changed, 129 insertions(+), 101 deletions(-)
|
||||
dlls/ddraw/ddraw.c | 233 +++++++++++++++++++++++++--------------------
|
||||
1 file changed, 132 insertions(+), 101 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index 8a1d0a4f..274a0907 100644
|
||||
index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -47,37 +47,80 @@ static const DDDEVICEIDENTIFIER2 deviceidentifier =
|
||||
@ -47,8 +47,7 @@ index 8a1d0a4f..274a0907 100644
|
||||
|
||||
- /* HAL device */
|
||||
+ /* RGB Emulation (D3D 1-7) */
|
||||
{
|
||||
- "WINE Direct3D7 Hardware acceleration using WineD3D",
|
||||
+ {
|
||||
+ D3D_VERSION(1)|D3D_VERSION(2)|D3D_VERSION(3)|D3D_VERSION(7),
|
||||
+ "WineD3D RGB Software Emulation",
|
||||
+ "RGB Emulation",
|
||||
@ -57,7 +56,8 @@ index 8a1d0a4f..274a0907 100644
|
||||
+ },
|
||||
+
|
||||
+ /* Direct3D HAL (D3D 1-7) */
|
||||
+ {
|
||||
{
|
||||
- "WINE Direct3D7 Hardware acceleration using WineD3D",
|
||||
+ D3D_VERSION(1)|D3D_VERSION(2)|D3D_VERSION(3)|D3D_VERSION(7),
|
||||
+ "WineD3D Hardware Acceleration",
|
||||
"Direct3D HAL",
|
||||
@ -77,7 +77,7 @@ index 8a1d0a4f..274a0907 100644
|
||||
+ "MMX Emulation",
|
||||
+ &IID_IDirect3DMMXDevice,
|
||||
+ 0,
|
||||
+ },
|
||||
},
|
||||
+
|
||||
+ /* Direct3D T&L HAL (D3D7 only) */
|
||||
+ {
|
||||
@ -86,7 +86,7 @@ index 8a1d0a4f..274a0907 100644
|
||||
+ "Direct3D T&L HAL",
|
||||
+ &IID_IDirect3DTnLHalDevice,
|
||||
+ 0,
|
||||
},
|
||||
+ },
|
||||
+
|
||||
+ /* In the future, we may wish to add the "Reference Rasterizer" and
|
||||
+ * "Null device", which are only available in DX6-8 and must be explicitly
|
||||
@ -141,7 +141,7 @@ index 8a1d0a4f..274a0907 100644
|
||||
*
|
||||
* Params:
|
||||
* callback: Function to call for each enumerated device
|
||||
@@ -3703,14 +3738,14 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3703,14 +3738,17 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
|
||||
dev_caps = device_desc7.dwDevCaps;
|
||||
|
||||
@ -152,15 +152,18 @@ index 8a1d0a4f..274a0907 100644
|
||||
|
||||
- device_desc7.deviceGUID = *device_list7[i].device_guid;
|
||||
- device_desc7.dwDevCaps = dev_caps & ~device_list7[i].remove_caps;
|
||||
+ device_desc7.deviceGUID = *device_list[i].device_guid;
|
||||
+ device_desc7.dwDevCaps = dev_caps & ~device_list[i].remove_caps;
|
||||
+ if (!(device_list[i].version_mask & D3D_VERSION(ddraw->d3dversion)))
|
||||
+ continue;
|
||||
|
||||
- ret = callback(device_list7[i].interface_name, device_list7[i].device_name, &device_desc7, context);
|
||||
+ device_desc7.deviceGUID = *device_list[i].device_guid;
|
||||
+ device_desc7.dwDevCaps = dev_caps & ~device_list[i].remove_caps;
|
||||
+
|
||||
+ ret = callback(device_list[i].device_name, device_list[i].device_name, &device_desc7, context);
|
||||
if (ret != DDENUMRET_OK)
|
||||
{
|
||||
TRACE("Application cancelled the enumeration.\n");
|
||||
@@ -3726,11 +3761,21 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3726,11 +3764,21 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
@ -184,7 +187,7 @@ index 8a1d0a4f..274a0907 100644
|
||||
*
|
||||
* Versions 1, 2 and 3
|
||||
*
|
||||
@@ -3745,18 +3790,18 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3745,18 +3793,18 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
*****************************************************************************/
|
||||
static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBACK callback, void *context)
|
||||
{
|
||||
@ -212,7 +215,7 @@ index 8a1d0a4f..274a0907 100644
|
||||
|
||||
TRACE("iface %p, callback %p, context %p.\n", iface, callback, context);
|
||||
|
||||
@@ -3765,52 +3810,58 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3765,52 +3813,58 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
|
||||
|
||||
wined3d_mutex_lock();
|
||||
|
||||
@ -310,7 +313,7 @@ index 8a1d0a4f..274a0907 100644
|
||||
{
|
||||
TRACE("Application cancelled the enumeration.\n");
|
||||
wined3d_mutex_unlock();
|
||||
@@ -3818,29 +3869,6 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3818,29 +3872,6 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "42683dd159385ed2f83fa6d9a8b73ed8b64e04e2"
|
||||
echo "6325d85406fbf7f46770bc739da4b7e2c9b199d7"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
|
Loading…
Reference in New Issue
Block a user