Commit d6dfb791 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw/tests: Fix some surface locking calls.

In ddraw7 DDLOCK_WAIT is the default behaviour, in earlier versions it's DDLOCK_DONOTWAIT.
parent be3a9b5e
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment