From b1b5c1c8c2bdadf82f42b3a9367ce7f9eea0ecbb Mon Sep 17 00:00:00 2001 From: Louis Lenders Date: Thu, 15 Oct 2009 23:13:12 +0200 Subject: d3d9/tests:test {IDirect3DTexture9:, IDirect3DSurface9}::UnlockRect for rectangles that are not locked --- dlls/d3d9/tests/surface.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/dlls/d3d9/tests/surface.c b/dlls/d3d9/tests/surface.c index 69c85f0..3de9f5a 100644 --- a/dlls/d3d9/tests/surface.c +++ b/dlls/d3d9/tests/surface.c @@ -166,7 +166,10 @@ static void test_surface_alignment(IDirect3DDevice9 *device_ptr) IDirect3DTexture9_GetLevelDesc(pTexture, j, &descr); hr = IDirect3DTexture9_LockRect(pTexture, j, &rc, NULL, 0); ok(SUCCEEDED(hr), "IDirect3DTexture9_LockRect: %08x\n", hr); - IDirect3DTexture9_UnlockRect(pTexture, j); + hr = IDirect3DTexture9_UnlockRect(pTexture, j); + ok(SUCCEEDED(hr), "IDirect3DTexture9_UnLockRect: %08x\n", hr); + hr = IDirect3DTexture9_UnlockRect(pTexture, j); +todo_wine ok(SUCCEEDED(hr), "Double IDirect3DTexture9_UnLockRect failed with %08x\n", hr); pitch = ((descr.Width + 3) >> 2) << 3; if (i > 0) pitch <<= 1; @@ -216,6 +219,8 @@ static void test_lockrect_offset(IDirect3DDevice9 *device) hr = IDirect3DSurface9_UnlockRect(surface); ok(SUCCEEDED(hr), "UnlockRect failed (%08x)\n", hr); + hr = IDirect3DSurface9_UnlockRect(surface); + ok(hr == D3DERR_INVALIDCALL, "Double UnlockRect returned %08x, expected D3DERR_INVALIDCALL\n", hr); hr = IDirect3DSurface9_LockRect(surface, &locked_rect, &rect, 0); ok(SUCCEEDED(hr), "LockRect failed (%08x)\n", hr); -- 1.6.0.4