d3d8: Translate E_INVALIDARG to D3DERR_INVALIDCALL in d3d8_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:07 +03:30 committed by Alexandre Julliard
parent 1f1b439b91
commit 035d9792ad
2 changed files with 2 additions and 1 deletions

View File

@ -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;
}

View File

@ -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);