Francois Gouget : ddraw/tests: Fix compilation on systems that don' t support nameless unions.

Alexandre Julliard julliard at winehq.org
Mon Feb 6 15:18:00 CST 2012


Module: wine
Branch: master
Commit: 527e1ae1ac1ebf5c02be3b8978d823d7d6eedb56
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=527e1ae1ac1ebf5c02be3b8978d823d7d6eedb56

Author: Francois Gouget <fgouget at free.fr>
Date:   Sun Feb  5 23:18:46 2012 +0100

ddraw/tests: Fix compilation on systems that don't support nameless unions.

---

 dlls/ddraw/tests/ddraw1.c |    2 +-
 dlls/ddraw/tests/ddraw2.c |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
index c4820b1..bac4bd9 100644
--- a/dlls/ddraw/tests/ddraw1.c
+++ b/dlls/ddraw/tests/ddraw1.c
@@ -719,7 +719,7 @@ static void test_surface_interface_mismatch(void)
     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);
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
index 10c065a..005136c 100644
--- a/dlls/ddraw/tests/ddraw2.c
+++ b/dlls/ddraw/tests/ddraw2.c
@@ -758,7 +758,7 @@ static void test_surface_interface_mismatch(void)
     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);
@@ -931,7 +931,7 @@ static void test_depth_blit(void)
     ddsd_new.ddsCaps.dwCaps = DDSCAPS_ZBUFFER;
     ddsd_new.dwWidth = ddsd_existing.dwWidth;
     ddsd_new.dwHeight = ddsd_existing.dwHeight;
-    U4(ddsd_new).ddpfPixelFormat = U4(ddsd_existing).ddpfPixelFormat;
+    ddsd_new.ddpfPixelFormat = ddsd_existing.ddpfPixelFormat;
     hr = IDirectDraw2_CreateSurface(ddraw, &ddsd_new, &ds2, NULL);
     ok(SUCCEEDED(hr), "Failed to create a surface, hr %#x.\n", hr);
     hr = IDirectDraw2_CreateSurface(ddraw, &ddsd_new, &ds3, NULL);
@@ -1028,7 +1028,7 @@ static void test_depth_blit(void)
      * a reliable result(z = 0.0) */
     memset(&fx, 0, sizeof(fx));
     fx.dwSize = sizeof(fx);
-    fx.dwFillDepth = 0;
+    U5(fx).dwFillDepth = 0;
     hr = IDirectDrawSurface_Blt(ds2, NULL, NULL, NULL, DDBLT_DEPTHFILL | DDBLT_WAIT, &fx);
     ok(SUCCEEDED(hr), "Failed to clear the source z buffer, hr %#x.\n", hr);
 




More information about the wine-cvs mailing list