Henri Verbeet : d3d8: Prefer bind flags over usage flags in d3d8_device_CopyRects().

Alexandre Julliard julliard at winehq.org
Mon Nov 5 15:51:52 CST 2018


Module: wine
Branch: master
Commit: 5731069addd04d2526b5dd458bd549e8d70b7904
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=5731069addd04d2526b5dd458bd549e8d70b7904

Author: Henri Verbeet <hverbeet at codeweavers.com>
Date:   Mon Nov  5 15:31:54 2018 +0330

d3d8: Prefer bind flags over usage flags in d3d8_device_CopyRects().

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

---

 dlls/d3d8/device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/d3d8/device.c b/dlls/d3d8/device.c
index 27b32fa..b05df7e 100644
--- a/dlls/d3d8/device.c
+++ b/dlls/d3d8/device.c
@@ -1267,7 +1267,7 @@ static HRESULT WINAPI d3d8_device_CopyRects(IDirect3DDevice8 *iface,
 
     wined3d_mutex_lock();
     wined3d_texture_get_sub_resource_desc(src->wined3d_texture, src->sub_resource_idx, &wined3d_desc);
-    if (wined3d_desc.usage & WINED3DUSAGE_DEPTHSTENCIL)
+    if (wined3d_desc.bind_flags & WINED3D_BIND_DEPTH_STENCIL)
     {
         WARN("Source %p is a depth stencil surface, returning D3DERR_INVALIDCALL.\n", src_surface);
         wined3d_mutex_unlock();
@@ -1278,7 +1278,7 @@ static HRESULT WINAPI d3d8_device_CopyRects(IDirect3DDevice8 *iface,
     src_h = wined3d_desc.height;
 
     wined3d_texture_get_sub_resource_desc(dst->wined3d_texture, dst->sub_resource_idx, &wined3d_desc);
-    if (wined3d_desc.usage & WINED3DUSAGE_DEPTHSTENCIL)
+    if (wined3d_desc.bind_flags & WINED3D_BIND_DEPTH_STENCIL)
     {
         WARN("Destination %p is a depth stencil surface, returning D3DERR_INVALIDCALL.\n", dst_surface);
         wined3d_mutex_unlock();




More information about the wine-cvs mailing list