d3d9: Return failure in CheckDeviceFormat() for unsupported adapter formats.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46579 Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
c79fbdd3bf
commit
bd7a48c251
|
@ -255,10 +255,11 @@ static HRESULT WINAPI d3d9_CheckDeviceFormat(IDirect3D9Ex *iface, UINT adapter,
|
||||||
TRACE("iface %p, adapter %u, device_type %#x, adapter_format %#x, usage %#x, resource_type %#x, format %#x.\n",
|
TRACE("iface %p, adapter %u, device_type %#x, adapter_format %#x, usage %#x, resource_type %#x, format %#x.\n",
|
||||||
iface, adapter, device_type, adapter_format, usage, resource_type, format);
|
iface, adapter, device_type, adapter_format, usage, resource_type, format);
|
||||||
|
|
||||||
if (!adapter_format)
|
if (adapter_format != D3DFMT_X8R8G8B8 && adapter_format != D3DFMT_R5G6B5
|
||||||
|
&& adapter_format != D3DFMT_X1R5G5B5)
|
||||||
{
|
{
|
||||||
WARN("Invalid adapter format.\n");
|
WARN("Invalid adapter format.\n");
|
||||||
return D3DERR_INVALIDCALL;
|
return adapter_format ? D3DERR_NOTAVAILABLE : D3DERR_INVALIDCALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bind_flags = wined3d_bind_flags_from_d3d9_usage(usage);
|
bind_flags = wined3d_bind_flags_from_d3d9_usage(usage);
|
||||||
|
|
Loading…
Reference in New Issue