Erich E. Hoover : ddraw: Return empty D3D hardware flags for RGB device enumeration.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Aug 11 17:03:46 CDT 2014


Module: wine
Branch: master
Commit: 45147b82efeceea76b37147f56e7088a27d18663
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=45147b82efeceea76b37147f56e7088a27d18663

Author: Erich E. Hoover <erich.e.hoover at gmail.com>
Date:   Sun Feb 16 14:14:42 2014 -0700

ddraw: Return empty D3D hardware flags for RGB device enumeration.

---

 dlls/ddraw/ddraw.c     |  2 ++
 dlls/ddraw/tests/d3d.c | 12 ++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
index 011c115..df74122 100644
--- a/dlls/ddraw/ddraw.c
+++ b/dlls/ddraw/ddraw.c
@@ -3683,6 +3683,8 @@ static HRESULT WINAPI d3d3_EnumDevices(IDirect3D3 *iface, LPD3DENUMDEVICESCALLBA
                 | D3DPTEXTURECAPS_NONPOW2CONDITIONAL | D3DPTEXTURECAPS_PERSPECTIVE);
         /* RGB, RAMP and MMX devices have a HAL dcmColorModel of 0 */
         hal_desc.dcmColorModel = 0;
+        /* RGB, RAMP and MMX devices cannot report HAL hardware flags */
+        hal_desc.dwFlags = 0;
 
         hr = callback((GUID *)&IID_IDirect3DRGBDevice, reference_description,
                 device_name, &hal_desc, &hel_desc, context);
diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c
index 9940b63..ec4197a 100644
--- a/dlls/ddraw/tests/d3d.c
+++ b/dlls/ddraw/tests/d3d.c
@@ -537,12 +537,18 @@ static HRESULT WINAPI enumDevicesCallback(GUID *Guid, char *DeviceDescription,
 
         ok(hal->dcmColorModel == 0, "RGB Device %u hal caps has colormodel %u\n", ver, hal->dcmColorModel);
         ok(hel->dcmColorModel == D3DCOLOR_RGB, "RGB Device %u hel caps has colormodel %u\n", ver, hel->dcmColorModel);
+
+        ok(hal->dwFlags == 0, "RGB Device %u hal caps has hardware flags %x\n", ver, hal->dwFlags);
+        ok(hel->dwFlags != 0, "RGB Device %u hel caps has hardware flags %x\n", ver, hel->dwFlags);
     }
     else if(IsEqualGUID(&IID_IDirect3DHALDevice, Guid))
     {
         trace("HAL Device %d\n", ver);
         ok(hal->dcmColorModel == D3DCOLOR_RGB, "HAL Device %u hal caps has colormodel %u\n", ver, hel->dcmColorModel);
         ok(hel->dcmColorModel == 0, "HAL Device %u hel caps has colormodel %u\n", ver, hel->dcmColorModel);
+
+        ok(hal->dwFlags != 0, "HAL Device %u hal caps has hardware flags %x\n", ver, hal->dwFlags);
+        ok(hel->dwFlags != 0, "HAL Device %u hel caps has hardware flags %x\n", ver, hel->dwFlags);
     }
     else if(IsEqualGUID(&IID_IDirect3DRefDevice, Guid))
     {
@@ -587,6 +593,9 @@ static HRESULT WINAPI enumDevicesCallback(GUID *Guid, char *DeviceDescription,
         ok(hal->dcmColorModel == 0, "Ramp Device %u hal caps has colormodel %u\n", ver, hal->dcmColorModel);
         ok(hel->dcmColorModel == D3DCOLOR_MONO, "Ramp Device %u hel caps has colormodel %u\n",
                 ver, hel->dcmColorModel);
+
+        ok(hal->dwFlags == 0, "Ramp Device %u hal caps has hardware flags %x\n", ver, hal->dwFlags);
+        ok(hel->dwFlags != 0, "Ramp Device %u hel caps has hardware flags %x\n", ver, hel->dwFlags);
     }
     else if(IsEqualGUID(&IID_IDirect3DMMXDevice, Guid))
     {
@@ -610,6 +619,9 @@ static HRESULT WINAPI enumDevicesCallback(GUID *Guid, char *DeviceDescription,
 
         ok(hal->dcmColorModel == 0, "MMX Device %u hal caps has colormodel %u\n", ver, hal->dcmColorModel);
         ok(hel->dcmColorModel == D3DCOLOR_RGB, "MMX Device %u hel caps has colormodel %u\n", ver, hel->dcmColorModel);
+
+        ok(hal->dwFlags == 0, "MMX Device %u hal caps has hardware flags %x\n", ver, hal->dwFlags);
+        ok(hel->dwFlags != 0, "MMX Device %u hel caps has hardware flags %x\n", ver, hel->dwFlags);
     }
     else
     {




More information about the wine-cvs mailing list