Commit 35d8c563 authored by Ken Thomases's avatar Ken Thomases Committed by Alexandre Julliard

d3d9: Make CheckDeviceType() fail for display formats other than D3DFMT_X8R8G8B8…

d3d9: Make CheckDeviceType() fail for display formats other than D3DFMT_X8R8G8B8 and D3DFMT_R5G6B5 in full-screen. The adapter mode functions already enforce this, and tests show CheckDeviceType() should fail for full-screen mode with display formats for which there are no adapter modes.
parent e3fa52a6
......@@ -232,6 +232,10 @@ static HRESULT WINAPI d3d9_CheckDeviceType(IDirect3D9Ex *iface, UINT adapter, D3
TRACE("iface %p, adapter %u, device_type %#x, display_format %#x, backbuffer_format %#x, windowed %#x.\n",
iface, adapter, device_type, display_format, backbuffer_format, windowed);
/* Others than that not supported by d3d9, but reported by wined3d for ddraw. Filter them out. */
if (!windowed && display_format != D3DFMT_X8R8G8B8 && display_format != D3DFMT_R5G6B5)
return WINED3DERR_NOTAVAILABLE;
wined3d_mutex_lock();
hr = wined3d_check_device_type(d3d9->wined3d, adapter, device_type, wined3dformat_from_d3dformat(display_format),
wined3dformat_from_d3dformat(backbuffer_format), windowed);
......
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