Re: [01/02] d3d9: update locked_rect only if wined3d_surface_map succeeds
On 21 October 2013 10:46, Lasse Rasinen <lrasinen(a)iki.fi> wrote:
diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c index 02b4174..51835c8 100644 --- a/dlls/d3d9/tests/device.c +++ b/dlls/d3d9/tests/device.c @@ -5402,8 +5402,12 @@ static void test_lockrect_invalid(void)
hr = IDirect3DSurface9_LockRect(surface, &locked_rect, NULL, 0); ok(SUCCEEDED(hr), "Failed to lock surface with rect NULL, hr %#x.\n", hr); + locked_rect.pBits = 0xdeadbeef; + locked_rect.Pitch = 1; hr = IDirect3DSurface9_LockRect(surface, &locked_rect, NULL, 0); ok(hr == D3DERR_INVALIDCALL, "Got unexpected hr %#x.\n", hr); + ok(locked_rect.pBits == 0xdeadbeef, "pBits changed on double lock.\n"); + ok(locked_rect.Pitch == 1, "Pitch changed on double lock.\n"); hr = IDirect3DSurface9_UnlockRect(surface); ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x.\n", hr);
This introduces warnings: device.c: In function ‘test_lockrect_invalid’: device.c:5405:23: warning: assignment makes pointer from integer without a cast [enabled by default] device.c:5409:26: warning: comparison between pointer and integer [enabled by default] Also applies to the d3d8 test.
participants (1)
-
Henri Verbeet