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

Alexandre Julliard julliard at winehq.org
Mon Jan 9 14:24:29 CST 2012


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

Author: Francois Gouget <fgouget at free.fr>
Date:   Mon Jan  9 09:27:56 2012 +0100

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

---

 dlls/ddraw/tests/ddraw4.c |   12 ++++++------
 dlls/ddraw/tests/ddraw7.c |   12 ++++++------
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
index 68448d1..3f195b7 100644
--- a/dlls/ddraw/tests/ddraw4.c
+++ b/dlls/ddraw/tests/ddraw4.c
@@ -566,12 +566,12 @@ static void test_clipper_blt(void)
     surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
     surface_desc.dwWidth = 640;
     surface_desc.dwHeight = 480;
-    surface_desc.ddpfPixelFormat.dwSize = sizeof(surface_desc.ddpfPixelFormat);
-    surface_desc.ddpfPixelFormat.dwFlags = DDPF_RGB;
-    U1(surface_desc.ddpfPixelFormat).dwRGBBitCount = 32;
-    U2(surface_desc.ddpfPixelFormat).dwRBitMask = 0x00ff0000;
-    U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x0000ff00;
-    U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff;
+    U4(surface_desc).ddpfPixelFormat.dwSize = sizeof(U4(surface_desc).ddpfPixelFormat);
+    U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_RGB;
+    U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 32;
+    U2(U4(surface_desc).ddpfPixelFormat).dwRBitMask = 0x00ff0000;
+    U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x0000ff00;
+    U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff;
 
     hr = IDirectDraw4_CreateSurface(ddraw, &surface_desc, &src_surface, NULL);
     ok(SUCCEEDED(hr), "Failed to create source surface, hr %#x.\n", hr);
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
index d434c94..6075009 100644
--- a/dlls/ddraw/tests/ddraw7.c
+++ b/dlls/ddraw/tests/ddraw7.c
@@ -559,12 +559,12 @@ static void test_clipper_blt(void)
     surface_desc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
     surface_desc.dwWidth = 640;
     surface_desc.dwHeight = 480;
-    surface_desc.ddpfPixelFormat.dwSize = sizeof(surface_desc.ddpfPixelFormat);
-    surface_desc.ddpfPixelFormat.dwFlags = DDPF_RGB;
-    U1(surface_desc.ddpfPixelFormat).dwRGBBitCount = 32;
-    U2(surface_desc.ddpfPixelFormat).dwRBitMask = 0x00ff0000;
-    U3(surface_desc.ddpfPixelFormat).dwGBitMask = 0x0000ff00;
-    U4(surface_desc.ddpfPixelFormat).dwBBitMask = 0x000000ff;
+    U4(surface_desc).ddpfPixelFormat.dwSize = sizeof(U4(surface_desc).ddpfPixelFormat);
+    U4(surface_desc).ddpfPixelFormat.dwFlags = DDPF_RGB;
+    U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount = 32;
+    U2(U4(surface_desc).ddpfPixelFormat).dwRBitMask = 0x00ff0000;
+    U3(U4(surface_desc).ddpfPixelFormat).dwGBitMask = 0x0000ff00;
+    U4(U4(surface_desc).ddpfPixelFormat).dwBBitMask = 0x000000ff;
 
     hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &src_surface, NULL);
     ok(SUCCEEDED(hr), "Failed to create source surface, hr %#x.\n", hr);




More information about the wine-cvs mailing list