[01/02] d3d9: update locked_rect only if wined3d_surface_map succeeds
Henri Verbeet
hverbeet at gmail.com
Mon Oct 21 06:46:15 CDT 2013
On 21 October 2013 10:46, Lasse Rasinen <lrasinen at 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.
More information about the wine-devel
mailing list