From 21036e13dff6f66f601bc3a219f9152bca2e9e0d Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Sun, 22 Jan 2012 19:26:47 +0100 Subject: [PATCH] ddraw/tests: Fix compilation on systems that don't support nameless unions. --- dlls/ddraw/tests/ddraw1.c | 4 ++-- dlls/ddraw/tests/ddraw2.c | 4 ++-- dlls/ddraw/tests/ddraw4.c | 2 +- dlls/ddraw/tests/ddraw7.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 7981c840d1..c580e4b865 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -137,7 +137,7 @@ static IDirect3DDevice *create_device(IDirectDraw *ddraw, HWND window, DWORD coo surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS | DDSD_ZBUFFERBITDEPTH | DDSD_WIDTH | DDSD_HEIGHT; surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; - surface_desc.dwZBufferBitDepth = z_depth; + U2(surface_desc).dwZBufferBitDepth = z_depth; surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw_CreateSurface(ddraw, &surface_desc, &ds, NULL); @@ -408,7 +408,7 @@ static void test_clipper_blt(void) hr = IDirectDrawSurface_Lock(src_surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr); - ok(surface_desc.lPitch == 2560, "Got unexpected surface pitch %u.\n", surface_desc.lPitch); + ok(U1(surface_desc).lPitch == 2560, "Got unexpected surface pitch %u.\n", U1(surface_desc).lPitch); ptr = surface_desc.lpSurface; memcpy(&ptr[ 0], &src_data[ 0], 6 * sizeof(DWORD)); memcpy(&ptr[ 640], &src_data[ 6], 6 * sizeof(DWORD)); diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 824ddb1124..d6a79afe13 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -144,7 +144,7 @@ static IDirect3DDevice2 *create_device(IDirectDraw2 *ddraw, HWND window, DWORD c surface_desc.dwSize = sizeof(surface_desc); surface_desc.dwFlags = DDSD_CAPS | DDSD_ZBUFFERBITDEPTH | DDSD_WIDTH | DDSD_HEIGHT; surface_desc.ddsCaps.dwCaps = DDSCAPS_ZBUFFER; - surface_desc.dwZBufferBitDepth = z_depth; + U2(surface_desc).dwZBufferBitDepth = z_depth; surface_desc.dwWidth = 640; surface_desc.dwHeight = 480; hr = IDirectDraw2_CreateSurface(ddraw, &surface_desc, &ds, NULL); @@ -418,7 +418,7 @@ static void test_clipper_blt(void) hr = IDirectDrawSurface_Lock(src_surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr); - ok(surface_desc.lPitch == 2560, "Got unexpected surface pitch %u.\n", surface_desc.lPitch); + ok(U1(surface_desc).lPitch == 2560, "Got unexpected surface pitch %u.\n", U1(surface_desc).lPitch); ptr = surface_desc.lpSurface; memcpy(&ptr[ 0], &src_data[ 0], 6 * sizeof(DWORD)); memcpy(&ptr[ 640], &src_data[ 6], 6 * sizeof(DWORD)); diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 68a478f3f1..69dcef79aa 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -640,7 +640,7 @@ static void test_clipper_blt(void) hr = IDirectDrawSurface4_Lock(src_surface, NULL, &surface_desc, DDLOCK_WAIT, NULL); ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr); - ok(surface_desc.lPitch == 2560, "Got unexpected surface pitch %u.\n", surface_desc.lPitch); + ok(U1(surface_desc).lPitch == 2560, "Got unexpected surface pitch %u.\n", U1(surface_desc).lPitch); ptr = surface_desc.lpSurface; memcpy(&ptr[ 0], &src_data[ 0], 6 * sizeof(DWORD)); memcpy(&ptr[ 640], &src_data[ 6], 6 * sizeof(DWORD)); diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index d5477f06d6..e3f59dd33c 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -633,7 +633,7 @@ static void test_clipper_blt(void) hr = IDirectDrawSurface7_Lock(src_surface, NULL, &surface_desc, 0, NULL); ok(SUCCEEDED(hr), "Failed to lock source surface, hr %#x.\n", hr); - ok(surface_desc.lPitch == 2560, "Got unexpected surface pitch %u.\n", surface_desc.lPitch); + ok(U1(surface_desc).lPitch == 2560, "Got unexpected surface pitch %u.\n", U1(surface_desc).lPitch); ptr = surface_desc.lpSurface; memcpy(&ptr[ 0], &src_data[ 0], 6 * sizeof(DWORD)); memcpy(&ptr[ 640], &src_data[ 6], 6 * sizeof(DWORD));