Commit e6c777d2 authored by Rafał Harabień's avatar Rafał Harabień Committed by Alexandre Julliard

d3d9: Fix handling of D3DENUM_WHQL_LEVEL.

D3DENUM_NO_WHQL_LEVEL from Direct3D 8 was replaced with D3DENUM_WHQL_LEVEL in Direct3D 9. Signed-off-by: 's avatarRafał Harabień <rafalh92@outlook.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 85152f3a
......@@ -121,6 +121,9 @@ static HRESULT WINAPI d3d8_GetAdapterIdentifier(IDirect3D8 *iface, UINT adapter,
adapter_id.description = identifier->Description;
adapter_id.description_size = sizeof(identifier->Description);
/* D3DENUM_NO_WHQL_LEVEL -> WINED3DENUM_WHQL_LEVEL */
flags ^= D3DENUM_NO_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)))
{
......
......@@ -2642,7 +2642,7 @@ static HRESULT WINAPI ddraw7_GetDeviceIdentifier(IDirectDraw7 *iface,
adapter_id.description = DDDI->szDescription;
adapter_id.description_size = sizeof(DDDI->szDescription);
wined3d_mutex_lock();
hr = wined3d_adapter_get_identifier(ddraw->wined3d_adapter, 0x0, &adapter_id);
hr = wined3d_adapter_get_identifier(ddraw->wined3d_adapter, WINED3DENUM_WHQL_LEVEL, &adapter_id);
wined3d_mutex_unlock();
if (FAILED(hr)) return hr;
......
......@@ -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);
......
......@@ -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)
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment