ddraw/tests: Fix some surface locking calls.

In ddraw7 DDLOCK_WAIT is the default behaviour, in earlier versions it's
DDLOCK_DONOTWAIT.
This commit is contained in:
Henri Verbeet 2012-01-11 21:27:31 +01:00 committed by Alexandre Julliard
parent be3a9b5ecb
commit d6dfb7914a
4 changed files with 4 additions and 4 deletions

View File

@ -283,7 +283,7 @@ static void test_clipper_blt(void)
hr = IDirectDrawSurface_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#x.\n", hr);
hr = IDirectDrawSurface_Lock(src_surface, NULL, &surface_desc, 0, NULL);
hr = IDirectDrawSurface_Lock(src_surface, NULL, &surface_desc, DDLOCK_WAIT, NULL);
ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr);
((DWORD *)surface_desc.lpSurface)[0] = 0xff0000ff;
((DWORD *)surface_desc.lpSurface)[1] = 0xff00ff00;

View File

@ -290,7 +290,7 @@ static void test_clipper_blt(void)
hr = IDirectDrawSurface_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#x.\n", hr);
hr = IDirectDrawSurface_Lock(src_surface, NULL, &surface_desc, 0, NULL);
hr = IDirectDrawSurface_Lock(src_surface, NULL, &surface_desc, DDLOCK_WAIT, NULL);
ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr);
((DWORD *)surface_desc.lpSurface)[0] = 0xff0000ff;
((DWORD *)surface_desc.lpSurface)[1] = 0xff00ff00;

View File

@ -585,7 +585,7 @@ static void test_clipper_blt(void)
hr = IDirectDrawSurface4_Blt(dst_surface, NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &fx);
ok(SUCCEEDED(hr), "Failed to clear destination surface, hr %#x.\n", hr);
hr = IDirectDrawSurface4_Lock(src_surface, NULL, &surface_desc, 0, NULL);
hr = IDirectDrawSurface4_Lock(src_surface, NULL, &surface_desc, DDLOCK_WAIT, NULL);
ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr);
((DWORD *)surface_desc.lpSurface)[0] = 0xff0000ff;
((DWORD *)surface_desc.lpSurface)[1] = 0xff00ff00;

View File

@ -86,7 +86,7 @@ static D3DCOLOR get_surface_color(IDirectDrawSurface7 *surface, UINT x, UINT y)
memset(&surface_desc, 0, sizeof(surface_desc));
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface7_Lock(surface, &rect, &surface_desc, DDLOCK_READONLY | DDLOCK_WAIT, NULL);
hr = IDirectDrawSurface7_Lock(surface, &rect, &surface_desc, DDLOCK_READONLY, NULL);
ok(SUCCEEDED(hr), "Failed to lock surface, hr %#x.\n", hr);
if (FAILED(hr))
return 0xdeadbeef;