From: "Erich E. Hoover" Subject: [PATCH 2/2] ddraw: Return empty D3D hardware flags for HEL device enumeration. Message-Id: Date: Wed, 30 Jul 2014 16:57:03 -0600 Some older games rely on D3D hardware flags to be empty for software-only devices (Bug #32581). This patch ensures that the HEL device we return has these flags set appropriately (0) to satisfy these applications, allowing them to locate the software-only device. From d9f356f8ab9ab852a98cf766cf6abaf26a87cf57 Mon Sep 17 00:00:00 2001 From: "Erich E. Hoover" Date: Sun, 16 Feb 2014 14:14:42 -0700 Subject: ddraw: Return empty D3D hardware flags for HEL device enumeration. --- dlls/ddraw/ddraw.c | 2 ++ dlls/ddraw/tests/d3d.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c index 011c115..f6618d7 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; + /* The HEL device cannot report 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 b3bd3c8..de5c0ba 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -537,12 +537,16 @@ 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 has hardware flags %x\n", ver, hal->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 has hardware flags %x\n", ver, hal->dwFlags); } else if(IsEqualGUID(&IID_IDirect3DRefDevice, Guid)) { -- 1.7.9.5