d3d8: Make CheckDeviceType() fail for display formats other than D3DFMT_X8R8G8B8 and D3DFMT_R5G6B5 in full-screen.

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:
Matteo Bruni 2016-02-11 16:10:45 +01:00 committed by Alexandre Julliard
parent 553149a049
commit 49a7dc8a16
1 changed files with 3 additions and 0 deletions

View File

@ -220,6 +220,9 @@ static HRESULT WINAPI d3d8_CheckDeviceType(IDirect3D8 *iface, UINT adapter, D3DD
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);
if (!windowed && display_format != D3DFMT_X8R8G8B8 && display_format != D3DFMT_R5G6B5)
return WINED3DERR_NOTAVAILABLE;
wined3d_mutex_lock();
hr = wined3d_check_device_type(d3d8->wined3d, adapter, device_type, wined3dformat_from_d3dformat(display_format),
wined3dformat_from_d3dformat(backbuffer_format), windowed);