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

Alexandre Julliard julliard at wine.codeweavers.com
Fri Feb 12 09:47:45 CST 2016


Module: wine
Branch: master
Commit: 49a7dc8a16b7e20fb361c8fcff0f5f1efc442902
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=49a7dc8a16b7e20fb361c8fcff0f5f1efc442902

Author: Matteo Bruni <mbruni at codeweavers.com>
Date:   Thu Feb 11 16:10:45 2016 +0100

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

Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/d3d8/directx.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c
index 7388bf3..863e596 100644
--- a/dlls/d3d8/directx.c
+++ b/dlls/d3d8/directx.c
@@ -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);




More information about the wine-cvs mailing list