Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/d3d8/surface.c | 2 ++ dlls/d3d8/tests/device.c | 1 - 2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/d3d8/surface.c b/dlls/d3d8/surface.c index eab9cb369af..7f90389905a 100644 --- a/dlls/d3d8/surface.c +++ b/dlls/d3d8/surface.c @@ -258,6 +258,8 @@ static HRESULT WINAPI d3d8_surface_LockRect(IDirect3DSurface8 *iface, locked_rect->pBits = NULL; }
+ if (hr == E_INVALIDARG) + return D3DERR_INVALIDCALL; return hr; }
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index 8495342c0d3..1bcbcf1b9a5 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -8437,7 +8437,6 @@ static void test_lockable_backbuffer(void) ok(SUCCEEDED(hr), "Failed to get backbuffer, hr %#x.\n", hr);
hr = IDirect3DSurface8_LockRect(surface, &lockrect, NULL, D3DLOCK_READONLY); -todo_wine ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr);
IDirect3DSurface8_Release(surface);