D3DENUM_NO_WHQL_LEVEL was renamed to D3DENUM_WHQL_LEVEL and its
meaning was negated in DirectX 9.
Signed-off-by: Rafał Harabień <rafalh92(a)outlook.com>
---
dlls/d3d8/directx.c | 5 +++++
dlls/wined3d/directx.c | 2 +-
include/d3d9.h | 2 +-
include/wine/wined3d.h | 2 +-
4 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c
index 0c0f2ecaadc..900e2782353 100644
--- a/dlls/d3d8/directx.c
+++ b/dlls/d3d8/directx.c
@@ -121,6 +121,11 @@ static HRESULT WINAPI d3d8_GetAdapterIdentifier(IDirect3D8 *iface, UINT adapter,
adapter_id.description = identifier->Description;
adapter_id.description_size = sizeof(identifier->Description);
+ if (flags & D3DENUM_NO_WHQL_LEVEL)
+ flags = flags & ~D3DENUM_NO_WHQL_LEVEL;
+ else
+ flags |= WINED3DENUM_WHQL_LEVEL;
+
wined3d_adapter = wined3d_output_get_adapter(d3d8->wined3d_outputs[output_idx]);
if (SUCCEEDED(hr = wined3d_adapter_get_identifier(wined3d_adapter, flags, &adapter_id)))
{
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c
index 412842469b3..d35108710c2 100644
--- a/dlls/wined3d/directx.c
+++ b/dlls/wined3d/directx.c
@@ -1513,7 +1513,7 @@ HRESULT CDECL wined3d_adapter_get_identifier(const struct wined3d_adapter *adapt
identifier->device_identifier = IID_D3DDEVICE_D3DUID;
identifier->driver_uuid = adapter->driver_uuid;
identifier->device_uuid = adapter->device_uuid;
- identifier->whql_level = (flags & WINED3DENUM_NO_WHQL_LEVEL) ? 0 : 1;
+ identifier->whql_level = (flags & WINED3DENUM_WHQL_LEVEL) ? 1 : 0;
identifier->adapter_luid = adapter->luid;
identifier->video_memory = min(~(SIZE_T)0, adapter->driver_info.vram_bytes);
identifier->shared_system_memory = min(~(SIZE_T)0, adapter->driver_info.sysmem_bytes);
diff --git a/include/d3d9.h b/include/d3d9.h
index 3ebde4509af..d61461f0833 100644
--- a/include/d3d9.h
+++ b/include/d3d9.h
@@ -61,7 +61,7 @@
*/
#define D3D_SDK_VERSION 32
#define D3DADAPTER_DEFAULT 0
-#define D3DENUM_NO_WHQL_LEVEL __MSABI_LONG(0x00000002)
+#define D3DENUM_WHQL_LEVEL __MSABI_LONG(0x00000002)
#define D3DPRESENT_DONOTWAIT __MSABI_LONG(1)
#define D3DPRESENT_LINEAR_CONTENT __MSABI_LONG(2)
#define D3DPRESENT_BACK_BUFFERS_MAX __MSABI_LONG(3)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index 1f370d69a88..310911992ae 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -874,7 +874,7 @@ enum wined3d_shader_type
#define WINED3DCOLORWRITEENABLE_ALPHA (1u << 3)
#define WINED3DADAPTER_DEFAULT 0
-#define WINED3DENUM_NO_WHQL_LEVEL 2
+#define WINED3DENUM_WHQL_LEVEL 2
#define WINED3DTSS_TCI_PASSTHRU 0x00000
#define WINED3DTSS_TCI_CAMERASPACENORMAL 0x10000
--
2.25.1