You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 83ca9a95de80083d906a2aeb5d1e5ca2ed611199
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
From 1171e61b81f598728dd5f242494a37dc74fb2870 Mon Sep 17 00:00:00 2001
|
||||
From 16d001f5562c37ac293fa547feef19887e635363 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 | 233 +++++++++++++++++++++++++--------------------
|
||||
1 file changed, 132 insertions(+), 101 deletions(-)
|
||||
dlls/ddraw/ddraw.c | 231 +++++++++++++++++++++++++--------------------
|
||||
1 file changed, 130 insertions(+), 101 deletions(-)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
index 83eeb33589e..324a149a425 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -47,37 +47,80 @@ static const DDDEVICEIDENTIFIER2 deviceidentifier =
|
||||
@@ -47,7 +47,8 @@ index 8a1d0a4f487..691ea7a6ef9 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",
|
||||
@@ -56,8 +57,7 @@ index 8a1d0a4f487..691ea7a6ef9 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 8a1d0a4f487..691ea7a6ef9 100644
|
||||
+ "MMX Emulation",
|
||||
+ &IID_IDirect3DMMXDevice,
|
||||
+ 0,
|
||||
},
|
||||
+ },
|
||||
+
|
||||
+ /* Direct3D T&L HAL (D3D7 only) */
|
||||
+ {
|
||||
@@ -86,7 +86,7 @@ index 8a1d0a4f487..691ea7a6ef9 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
|
||||
@@ -106,7 +106,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
};
|
||||
|
||||
static void STDMETHODCALLTYPE ddraw_null_wined3d_object_destroyed(void *parent) {}
|
||||
@@ -1396,15 +1439,6 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps)
|
||||
@@ -1389,15 +1432,6 @@ HRESULT ddraw_get_d3dcaps(const struct ddraw *ddraw, D3DDEVICEDESC7 *caps)
|
||||
D3DPTADDRESSCAPS_WRAP | D3DPTADDRESSCAPS_MIRROR | D3DPTADDRESSCAPS_CLAMP |
|
||||
D3DPTADDRESSCAPS_BORDER | D3DPTADDRESSCAPS_INDEPENDENTUV);
|
||||
|
||||
@@ -122,16 +122,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
/* Fill the missing members, and do some fixup */
|
||||
caps->dpcLineCaps.dwSize = sizeof(caps->dpcLineCaps);
|
||||
caps->dpcLineCaps.dwTextureBlendCaps = D3DPTBLENDCAPS_ADD
|
||||
@@ -1547,6 +1581,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
|
||||
|
||||
IDirect3D7_EnumZBufferFormats(&ddraw->IDirect3D7_iface, &IID_IDirect3DHALDevice, enum_zbuffer, &caps);
|
||||
|
||||
+ caps.ddsOldCaps.dwCaps = caps.ddsCaps.dwCaps;
|
||||
+
|
||||
if(DriverCaps)
|
||||
{
|
||||
DD_STRUCT_COPY_BYSIZE(DriverCaps, &caps);
|
||||
@@ -3669,8 +3705,7 @@ static HRESULT WINAPI ddraw1_DuplicateSurface(IDirectDraw *iface, IDirectDrawSur
|
||||
@@ -3713,8 +3747,7 @@ static HRESULT WINAPI ddraw1_DuplicateSurface(IDirectDraw *iface, IDirectDrawSur
|
||||
/*****************************************************************************
|
||||
* IDirect3D7::EnumDevices
|
||||
*
|
||||
@@ -141,7 +132,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
*
|
||||
* Params:
|
||||
* callback: Function to call for each enumerated device
|
||||
@@ -3703,14 +3738,17 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3747,14 +3780,17 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
|
||||
dev_caps = device_desc7.dwDevCaps;
|
||||
|
||||
@@ -154,16 +145,16 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
- device_desc7.dwDevCaps = dev_caps & ~device_list7[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_list7[i].interface_name, device_list7[i].device_name, &device_desc7, context);
|
||||
+ 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 +3764,21 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3770,11 +3806,21 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
@@ -187,7 +178,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
*
|
||||
* Versions 1, 2 and 3
|
||||
*
|
||||
@@ -3745,18 +3793,18 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3789,18 +3835,18 @@ static HRESULT WINAPI d3d7_EnumDevices(IDirect3D7 *iface, LPD3DENUMDEVICESCALLBA
|
||||
*****************************************************************************/
|
||||
static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBACK callback, void *context)
|
||||
{
|
||||
@@ -215,7 +206,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
|
||||
TRACE("iface %p, callback %p, context %p.\n", iface, callback, context);
|
||||
|
||||
@@ -3765,52 +3813,58 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3809,52 +3855,58 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
|
||||
|
||||
wined3d_mutex_lock();
|
||||
|
||||
@@ -313,7 +304,7 @@ index 8a1d0a4f487..691ea7a6ef9 100644
|
||||
{
|
||||
TRACE("Application cancelled the enumeration.\n");
|
||||
wined3d_mutex_unlock();
|
||||
@@ -3818,29 +3872,6 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
|
||||
@@ -3862,29 +3914,6 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user