d3d9: Translate E_INVALIDARG to D3DERR_INVALIDCALL in d3d9_surface_LockRect().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2018-11-08 21:29:05 +03:30 committed by Alexandre Julliard
parent 471715b946
commit 6b86019a96
2 changed files with 2 additions and 1 deletions

View File

@ -258,6 +258,8 @@ static HRESULT WINAPI d3d9_surface_LockRect(IDirect3DSurface9 *iface,
locked_rect->pBits = map_desc.data;
}
if (hr == E_INVALIDARG)
return D3DERR_INVALIDCALL;
return hr;
}

View File

@ -12103,7 +12103,6 @@ static void test_lockable_backbuffer(void)
ok(SUCCEEDED(hr), "Failed to get backbuffer, hr %#x.\n", hr);
hr = IDirect3DSurface9_LockRect(surface, &lockrect, NULL, D3DLOCK_DISCARD);
todo_wine
ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
dc = (void *)0xdeadbeef;