ddraw/tests: Use wine_dbgstr_rect() in the ddraw7 tests.

Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2016-06-08 22:37:13 +02:00 committed by Alexandre Julliard
parent 7d74583e8a
commit a602e2f69a
1 changed files with 65 additions and 99 deletions

View File

@ -762,10 +762,8 @@ static void test_clipper_blt(void)
ok(rgn_data->rdh.iType == RDH_RECTANGLES, "Got unexpected type %#x.\n", rgn_data->rdh.iType);
ok(rgn_data->rdh.nCount >= 1, "Got unexpected count %u.\n", rgn_data->rdh.nCount);
ok(EqualRect(&rgn_data->rdh.rcBound, &client_rect),
"Got unexpected bounding rect {%d, %d, %d, %d}, expected {%d, %d, %d, %d}.\n",
rgn_data->rdh.rcBound.left, rgn_data->rdh.rcBound.top,
rgn_data->rdh.rcBound.right, rgn_data->rdh.rcBound.bottom,
client_rect.left, client_rect.top, client_rect.right, client_rect.bottom);
"Got unexpected bounding rect %s, expected %s.\n",
wine_dbgstr_rect(&rgn_data->rdh.rcBound), wine_dbgstr_rect(&client_rect));
HeapFree(GetProcessHeap(), 0, rgn_data);
r1 = CreateRectRgn(0, 0, 320, 240);
@ -2180,9 +2178,8 @@ static void test_window_style(void)
todo_wine ok(tmp == exstyle, "Expected window extended style %#x, got %#x.\n", exstyle, tmp);
GetWindowRect(window, &r);
ok(EqualRect(&r, &fullscreen_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
fullscreen_rect.left, fullscreen_rect.top, fullscreen_rect.right, fullscreen_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &fullscreen_rect), "Expected %s, got %s.\n",
wine_dbgstr_rect(&fullscreen_rect), wine_dbgstr_rect(&r));
GetClientRect(window, &r);
todo_wine ok(!EqualRect(&r, &fullscreen_rect), "Client rect and window rect are equal.\n");
@ -2263,18 +2260,14 @@ static void test_redundant_mode_set(void)
r.bottom /= 2;
SetWindowPos(window, HWND_TOP, r.left, r.top, r.right, r.bottom, 0);
GetWindowRect(window, &s);
ok(EqualRect(&r, &s), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
r.left, r.top, r.right, r.bottom,
s.left, s.top, s.right, s.bottom);
ok(EqualRect(&r, &s), "Expected %s, got %s.\n", wine_dbgstr_rect(&r), wine_dbgstr_rect(&s));
hr = IDirectDraw7_SetDisplayMode(ddraw, surface_desc.dwWidth, surface_desc.dwHeight,
U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount, 0, 0);
ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr);
GetWindowRect(window, &s);
ok(EqualRect(&r, &s), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
r.left, r.top, r.right, r.bottom,
s.left, s.top, s.right, s.bottom);
ok(EqualRect(&r, &s), "Expected %s, got %s.\n", wine_dbgstr_rect(&r), wine_dbgstr_rect(&s));
ref = IDirectDraw7_Release(ddraw);
ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref);
@ -2465,9 +2458,8 @@ static void test_coop_level_mode_set(void)
ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr);
GetWindowRect(window, &r);
ok(EqualRect(&r, &user32_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
user32_rect.left, user32_rect.top, user32_rect.right, user32_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &user32_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&user32_rect),
wine_dbgstr_rect(&r));
memset(&ddsd, 0, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
@ -2484,9 +2476,8 @@ static void test_coop_level_mode_set(void)
param.user32_height, ddsd.dwHeight);
GetWindowRect(window, &r);
ok(EqualRect(&r, &user32_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
user32_rect.left, user32_rect.top, user32_rect.right, user32_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &user32_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&user32_rect),
wine_dbgstr_rect(&r));
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE);
expect_messages = exclusive_messages;
@ -2507,9 +2498,8 @@ static void test_coop_level_mode_set(void)
param.ddraw_width, param.ddraw_height, screen_size.cx, screen_size.cy);
GetWindowRect(window, &r);
ok(EqualRect(&r, &ddraw_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
ddraw_rect.left, ddraw_rect.top, ddraw_rect.right, ddraw_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &ddraw_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&ddraw_rect),
wine_dbgstr_rect(&r));
hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
@ -2534,9 +2524,8 @@ static void test_coop_level_mode_set(void)
param.ddraw_height, ddsd.dwHeight);
GetWindowRect(window, &r);
ok(EqualRect(&r, &ddraw_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
ddraw_rect.left, ddraw_rect.top, ddraw_rect.right, ddraw_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &ddraw_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&ddraw_rect),
wine_dbgstr_rect(&r));
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE);
expect_messages = exclusive_messages;
@ -2557,9 +2546,8 @@ static void test_coop_level_mode_set(void)
param.user32_width, param.user32_height, screen_size.cx, screen_size.cy);
GetWindowRect(window, &r);
ok(EqualRect(&r, &user32_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
user32_rect.left, user32_rect.top, user32_rect.right, user32_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &user32_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&user32_rect),
wine_dbgstr_rect(&r));
expect_messages = exclusive_focus_loss_messages;
ret = SetForegroundWindow(GetDesktopWindow());
@ -2578,9 +2566,8 @@ static void test_coop_level_mode_set(void)
ok(!expect_messages->message, "Expected message %#x, but didn't receive it.\n", expect_messages->message);
GetWindowRect(window, &r);
ok(EqualRect(&r, &ddraw_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
ddraw_rect.left, ddraw_rect.top, ddraw_rect.right, ddraw_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &ddraw_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&ddraw_rect),
wine_dbgstr_rect(&r));
ret = EnumDisplaySettingsW(NULL, ENUM_CURRENT_SETTINGS, &devmode);
ok(ret, "Failed to get display mode.\n");
ok(devmode.dmPelsWidth == param.ddraw_width
@ -2632,9 +2619,8 @@ static void test_coop_level_mode_set(void)
registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, screen_size.cx, screen_size.cy);
GetWindowRect(window, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
@ -2663,17 +2649,15 @@ static void test_coop_level_mode_set(void)
registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_NORMAL);
ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr);
GetWindowRect(window, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
@ -2698,9 +2682,8 @@ static void test_coop_level_mode_set(void)
registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE);
expect_messages = normal_messages;
@ -2722,9 +2705,8 @@ static void test_coop_level_mode_set(void)
ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE);
expect_messages = normal_messages;
@ -2745,9 +2727,8 @@ static void test_coop_level_mode_set(void)
ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
@ -2772,9 +2753,8 @@ static void test_coop_level_mode_set(void)
param.ddraw_height, ddsd.dwHeight);
GetWindowRect(window, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE);
expect_messages = normal_messages;
@ -2793,9 +2773,8 @@ static void test_coop_level_mode_set(void)
ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
@ -2830,9 +2809,8 @@ static void test_coop_level_mode_set(void)
registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
/* DDSCL_NORMAL | DDSCL_FULLSCREEN behaves the same as just DDSCL_NORMAL.
* Resizing the window on mode changes is a property of DDSCL_EXCLUSIVE,
@ -2841,9 +2819,8 @@ static void test_coop_level_mode_set(void)
ok(SUCCEEDED(hr), "SetCooperativeLevel failed, hr %#x.\n", hr);
GetWindowRect(window, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
@ -2868,9 +2845,8 @@ static void test_coop_level_mode_set(void)
registry_mode.dmPelsHeight, ddsd.dwHeight);
GetWindowRect(window, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE);
expect_messages = normal_messages;
@ -2892,9 +2868,8 @@ static void test_coop_level_mode_set(void)
ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE);
expect_messages = normal_messages;
@ -2915,9 +2890,8 @@ static void test_coop_level_mode_set(void)
ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
@ -2942,9 +2916,8 @@ static void test_coop_level_mode_set(void)
param.ddraw_height, ddsd.dwHeight);
GetWindowRect(window, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
PeekMessageA(&msg, 0, 0, 0, PM_NOREMOVE);
expect_messages = normal_messages;
@ -2963,9 +2936,8 @@ static void test_coop_level_mode_set(void)
ok(!screen_size.cx && !screen_size.cy, "Got unexpected screen size %ux%u.\n", screen_size.cx, screen_size.cy);
GetWindowRect(window, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
hr = IDirectDrawSurface7_GetSurfaceDesc(primary, &ddsd);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
@ -3001,9 +2973,8 @@ static void test_coop_level_mode_set(void)
IDirectDrawSurface7_Release(primary);
GetWindowRect(window, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
/* Changing the coop level from EXCLUSIVE to NORMAL restores the screen resolution */
hr = IDirectDraw7_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
@ -3028,9 +2999,8 @@ static void test_coop_level_mode_set(void)
screen_size.cx, screen_size.cy);
GetWindowRect(window, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
memset(&ddsd, 0, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
@ -3099,13 +3069,11 @@ static void test_coop_level_mode_set(void)
registry_mode.dmPelsWidth, registry_mode.dmPelsHeight, screen_size2.cx, screen_size2.cy);
GetWindowRect(window, &r);
ok(EqualRect(&r, &ddraw_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
ddraw_rect.left, ddraw_rect.top, ddraw_rect.right, ddraw_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &ddraw_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&ddraw_rect),
wine_dbgstr_rect(&r));
GetWindowRect(window2, &r);
ok(EqualRect(&r, &registry_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
registry_rect.left, registry_rect.top, registry_rect.right, registry_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &registry_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&registry_rect),
wine_dbgstr_rect(&r));
memset(&ddsd, 0, sizeof(ddsd));
ddsd.dwSize = sizeof(ddsd);
@ -3126,9 +3094,8 @@ static void test_coop_level_mode_set(void)
ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref);
GetWindowRect(window, &r);
ok(EqualRect(&r, &ddraw_rect), "Expected {%d, %d, %d, %d}, got {%d, %d, %d, %d}.\n",
ddraw_rect.left, ddraw_rect.top, ddraw_rect.right, ddraw_rect.bottom,
r.left, r.top, r.right, r.bottom);
ok(EqualRect(&r, &ddraw_rect), "Expected %s, got %s.\n", wine_dbgstr_rect(&ddraw_rect),
wine_dbgstr_rect(&r));
expect_messages = NULL;
DestroyWindow(window);
@ -10887,8 +10854,8 @@ static void test_lockrect_invalid(void)
locked_desc.dwSize = sizeof(locked_desc);
hr = IDirectDrawSurface7_Lock(surface, rect, &locked_desc, DDLOCK_WAIT, NULL);
ok(SUCCEEDED(hr), "Lock failed (%#x) for rect [%d, %d]->[%d, %d], type %s.\n",
hr, rect->left, rect->top, rect->right, rect->bottom, resources[r].name);
ok(SUCCEEDED(hr), "Lock failed (%#x) for rect %s, type %s.\n",
hr, wine_dbgstr_rect(rect), resources[r].name);
hr = IDirectDrawSurface7_Unlock(surface, NULL);
ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name);
@ -10903,8 +10870,8 @@ static void test_lockrect_invalid(void)
hr = IDirectDrawSurface7_Lock(surface, rect, &locked_desc, DDLOCK_WAIT, NULL);
todo_wine_if (SUCCEEDED(resources[r].hr))
ok(hr == resources[r].hr, "Lock returned %#x for rect [%d, %d]->[%d, %d], type %s.\n",
hr, rect->left, rect->top, rect->right, rect->bottom, resources[r].name);
ok(hr == resources[r].hr, "Lock returned %#x for rect %s, type %s.\n",
hr, wine_dbgstr_rect(rect), resources[r].name);
if (SUCCEEDED(hr))
{
hr = IDirectDrawSurface7_Unlock(surface, NULL);
@ -10924,11 +10891,10 @@ static void test_lockrect_invalid(void)
ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name);
hr = IDirectDrawSurface7_Lock(surface, &valid[0], &locked_desc, DDLOCK_WAIT, NULL);
ok(SUCCEEDED(hr), "Lock(rect = [%d, %d]->[%d, %d]) failed (%#x).\n",
valid[0].left, valid[0].top, valid[0].right, valid[0].bottom, hr);
ok(SUCCEEDED(hr), "Lock(rect = %s) failed (%#x).\n", wine_dbgstr_rect(&valid[0]), hr);
hr = IDirectDrawSurface7_Lock(surface, &valid[0], &locked_desc, DDLOCK_WAIT, NULL);
ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = [%d, %d]->[%d, %d]) failed (%#x).\n",
valid[0].left, valid[0].top, valid[0].right, valid[0].bottom, hr);
ok(hr == DDERR_SURFACEBUSY, "Double lock(rect = %s) failed (%#x).\n",
wine_dbgstr_rect(&valid[0]), hr);
/* Locking a different rectangle returns DD_OK, but it seems to break the surface.
* Afterwards unlocking the surface fails(NULL rectangle or both locked rectangles) */