Commit 536fce7f authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

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: 's avatarMatteo Bruni <mbruni@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent a838e144
...@@ -209,7 +209,7 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO ...@@ -209,7 +209,7 @@ HRESULT lock_surface(IDirect3DSurface9 *surface, const RECT *surface_rect, D3DLO
DWORD lock_flag; DWORD lock_flag;
HRESULT hr; HRESULT hr;
lock_flag = write ? D3DLOCK_DISCARD : D3DLOCK_READONLY; lock_flag = write ? 0 : D3DLOCK_READONLY;
*temp_surface = NULL; *temp_surface = NULL;
if (FAILED(hr = IDirect3DSurface9_LockRect(surface, lock, surface_rect, lock_flag))) if (FAILED(hr = IDirect3DSurface9_LockRect(surface, lock, surface_rect, lock_flag)))
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment