Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/d3d9/surface.c | 2 ++ dlls/d3d9/tests/device.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d9/surface.c b/dlls/d3d9/surface.c index 50c035d93c7..7d4d93b5e8f 100644 --- a/dlls/d3d9/surface.c +++ b/dlls/d3d9/surface.c @@ -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; }
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 56f7a4357ba..aba083c7754 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -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;