ddraw/tests: Use wine_dbgstr_rect() in the ddraw4 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:35:25 +02:00 committed by Alexandre Julliard
parent bfe3475d5a
commit 7d74583e8a
1 changed files with 65 additions and 99 deletions

View File

@ -855,10 +855,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);
@ -2449,9 +2447,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");
@ -2533,18 +2530,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 = IDirectDraw4_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 = IDirectDraw4_Release(ddraw);
ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref);
@ -2735,9 +2728,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);
@ -2754,9 +2746,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;
@ -2777,9 +2768,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 = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
@ -2804,9 +2794,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;
@ -2827,9 +2816,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());
@ -2848,9 +2836,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
@ -2902,9 +2889,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 = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
@ -2933,17 +2919,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 = IDirectDraw4_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 = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
@ -2968,9 +2952,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;
@ -2992,9 +2975,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;
@ -3015,9 +2997,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 = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
@ -3042,9 +3023,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;
@ -3063,9 +3043,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 = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
@ -3100,9 +3079,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,
@ -3111,9 +3089,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 = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
@ -3138,9 +3115,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;
@ -3162,9 +3138,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;
@ -3185,9 +3160,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 = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
@ -3212,9 +3186,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;
@ -3233,9 +3206,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 = IDirectDrawSurface4_GetSurfaceDesc(primary, &ddsd);
ok(SUCCEEDED(hr), "Failed to get surface desc, hr %#x.\n", hr);
@ -3271,9 +3243,8 @@ static void test_coop_level_mode_set(void)
IDirectDrawSurface4_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 = IDirectDraw4_SetCooperativeLevel(ddraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
@ -3298,9 +3269,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);
@ -3369,13 +3339,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);
@ -3396,9 +3364,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);
@ -10563,8 +10530,8 @@ static void test_lockrect_invalid(void)
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface4_Lock(surface, rect, &surface_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 = IDirectDrawSurface4_Unlock(surface, NULL);
ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name);
@ -10578,8 +10545,8 @@ static void test_lockrect_invalid(void)
surface_desc.dwSize = sizeof(surface_desc);
hr = IDirectDrawSurface4_Lock(surface, rect, &surface_desc, DDLOCK_WAIT, NULL);
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 = IDirectDrawSurface4_Unlock(surface, NULL);
@ -10599,11 +10566,10 @@ static void test_lockrect_invalid(void)
ok(SUCCEEDED(hr), "Failed to unlock surface, hr %#x, type %s.\n", hr, resources[r].name);
hr = IDirectDrawSurface4_Lock(surface, &valid[0], &surface_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 = IDirectDrawSurface4_Lock(surface, &valid[0], &surface_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) */