https://git.reactos.org/?p=reactos.git;a=commitdiff;h=497d1c4360f0f7a5f7ae12115f5982a4d226d215

commit 497d1c4360f0f7a5f7ae12115f5982a4d226d215
Author:     winesync <[email protected]>
AuthorDate: Mon Sep 21 23:00:51 2020 +0200
Commit:     Jérôme Gardou <[email protected]>
CommitDate: Thu Feb 4 16:37:04 2021 +0100

    [WINESYNC] d3dx9: Don't pass the D3DLOCK_DISCARD flag when mapping a 
texture.
    
    We aren't necessarily rewriting the whole surface (e.g. rect smaller than
    the whole surface, color key).
    
    Signed-off-by: Matteo Bruni <[email protected]>
    Signed-off-by: Alexandre Julliard <[email protected]>
    
    wine commit id 536fce7f3b887fcc087d4c00106ceb2f0ff93c01 by Matteo Bruni 
<[email protected]>
---
 dll/directx/wine/d3dx9_36/surface.c | 2 +-
 sdk/tools/winesync/d3dx9.cfg        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dll/directx/wine/d3dx9_36/surface.c 
b/dll/directx/wine/d3dx9_36/surface.c
index 4a0c84990aa..04cdc254f69 100644
--- a/dll/directx/wine/d3dx9_36/surface.c
+++ b/dll/directx/wine/d3dx9_36/surface.c
@@ -213,7 +213,7 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT 
*surface_rect, D3DLO
     DWORD lock_flag;
     HRESULT hr;
 
-    lock_flag = write ? D3DLOCK_DISCARD : D3DLOCK_READONLY;
+    lock_flag = write ? 0 : D3DLOCK_READONLY;
     *temp_surface = NULL;
     if (FAILED(hr = IDirect3DSurface9_LockRect(surface, lock, surface_rect, 
lock_flag)))
     {
diff --git a/sdk/tools/winesync/d3dx9.cfg b/sdk/tools/winesync/d3dx9.cfg
index 9a7e317d0c1..a974d2afe68 100644
--- a/sdk/tools/winesync/d3dx9.cfg
+++ b/sdk/tools/winesync/d3dx9.cfg
@@ -15,4 +15,4 @@ files: {include/d3dx9.h: sdk/include/dxsdk/d3dx9.h, 
include/d3dx9anim.h: sdk/inc
   include/d3dx9mesh.h: sdk/include/dxsdk/d3dx9mesh.h, include/d3dx9of.h: 
sdk/include/dxsdk/d3dx9of.h,
   include/d3dx9shader.h: sdk/include/dxsdk/d3dx9shader.h, 
include/d3dx9shape.h: sdk/include/dxsdk/d3dx9shape.h,
   include/d3dx9tex.h: sdk/include/dxsdk/d3dx9tex.h, include/d3dx9xof.h: 
sdk/include/dxsdk/d3dx9xof.h}
-tags: {wine: a838e144dcaa55e227d7e99566a59f7a31d97227}
+tags: {wine: 536fce7f3b887fcc087d4c00106ceb2f0ff93c01}

Reply via email to