Matteo Bruni : d3dx9: Don't pass the D3DLOCK_DISCARD flag when mapping a texture.
Alexandre Julliard
julliard at winehq.org
Fri Sep 27 15:56:30 CDT 2019
Module: wine
Branch: master
Commit: 536fce7f3b887fcc087d4c00106ceb2f0ff93c01
URL: https://source.winehq.org/git/wine.git/?a=commit;h=536fce7f3b887fcc087d4c00106ceb2f0ff93c01
Author: Matteo Bruni <mbruni at codeweavers.com>
Date: Fri Sep 27 20:40:04 2019 +0200
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 <mbruni at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/d3dx9_36/surface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c
index 5665bdc3b4..bd2055d54d 100644
--- a/dlls/d3dx9_36/surface.c
+++ b/dlls/d3dx9_36/surface.c
@@ -209,7 +209,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)))
{
More information about the wine-cvs
mailing list