d3d9: Properly test for dynamic usage in device_parent_CreateSurface().

Henri Verbeet hverbeet at codeweavers.com
Fri Jan 16 03:14:25 CST 2009


---
 dlls/d3d9/device.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c
index ec796d2..768bf9d 100644
--- a/dlls/d3d9/device.c
+++ b/dlls/d3d9/device.c
@@ -1807,7 +1807,7 @@ static HRESULT STDMETHODCALLTYPE device_parent_CreateSurface(IWineD3DDeviceParen
             "\tpool %#x, level %u, face %u, surface %p\n",
             iface, superior, width, height, format, usage, pool, level, face, surface);
 
-    if (pool == D3DPOOL_DEFAULT && usage != D3DUSAGE_DYNAMIC) lockable = FALSE;
+    if (pool == D3DPOOL_DEFAULT && !(usage & D3DUSAGE_DYNAMIC)) lockable = FALSE;
 
     hr = IDirect3DDevice9Impl_CreateSurface((IDirect3DDevice9Ex *)This, width, height,
             format, lockable, FALSE /* Discard */, level, (IDirect3DSurface9 **)&d3d_surface,
-- 
1.6.0.6



--------------000305070108040906080709--



More information about the wine-patches mailing list