[PATCH 4/6] d3d9: Translate E_INVALIDARG to D3DERR_INVALIDCALL in d3d9_surface_LockRect().
Signed-off-by: Henri Verbeet <hverbeet(a)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; -- 2.11.0
Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=44085 Your paranoid android. === w8 (32 bit Windows report) === d3d9: device.c:2158: Test failed: IDirect3DDevice9_TestCooperativeLevel after a successful reset returned 0x88760869 === debian9 (build log) === X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) === debian9 (build log) === X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
participants (2)
-
Henri Verbeet -
Marvin