From 15b6ff20236e4546b1c5e9c4b0f657f59ff54d61 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Thu, 12 Sep 2013 23:55:46 +0200 Subject: [PATCH] ddraw/tests: Fix compilation on systems that don't support nameless unions. --- dlls/ddraw/tests/ddraw4.c | 8 ++++---- dlls/ddraw/tests/ddraw7.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 21a2d40f2c7..348b13c90d8 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -4063,9 +4063,9 @@ static void test_block_formats_creation(void) ddsd.dwFlags = DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS; ddsd.ddsCaps.dwCaps = types[j].caps; ddsd.ddsCaps.dwCaps2 = types[j].caps2; - ddsd.ddpfPixelFormat.dwSize = sizeof(ddsd.ddpfPixelFormat); - ddsd.ddpfPixelFormat.dwFlags = DDPF_FOURCC; - ddsd.ddpfPixelFormat.dwFourCC = formats[i].fourcc; + U4(ddsd).ddpfPixelFormat.dwSize = sizeof(U4(ddsd).ddpfPixelFormat); + U4(ddsd).ddpfPixelFormat.dwFlags = DDPF_FOURCC; + U4(ddsd).ddpfPixelFormat.dwFourCC = formats[i].fourcc; ddsd.dwWidth = w; ddsd.dwHeight = h; @@ -4189,7 +4189,7 @@ static void test_unsupported_formats(void) memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; - ddsd.ddpfPixelFormat = formats[i].fmt; + U4(ddsd).ddpfPixelFormat = formats[i].fmt; ddsd.dwWidth = 4; ddsd.dwHeight = 4; ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE | caps[j]; diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index ebfb16f76c9..7f75cc72f08 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -3876,9 +3876,9 @@ static void test_block_formats_creation(void) ddsd.dwFlags = DDSD_PIXELFORMAT | DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS; ddsd.ddsCaps.dwCaps = types[j].caps; ddsd.ddsCaps.dwCaps2 = types[j].caps2; - ddsd.ddpfPixelFormat.dwSize = sizeof(ddsd.ddpfPixelFormat); - ddsd.ddpfPixelFormat.dwFlags = DDPF_FOURCC; - ddsd.ddpfPixelFormat.dwFourCC = formats[i].fourcc; + U4(ddsd).ddpfPixelFormat.dwSize = sizeof(U4(ddsd).ddpfPixelFormat); + U4(ddsd).ddpfPixelFormat.dwFlags = DDPF_FOURCC; + U4(ddsd).ddpfPixelFormat.dwFourCC = formats[i].fourcc; ddsd.dwWidth = w; ddsd.dwHeight = h; @@ -4002,7 +4002,7 @@ static void test_unsupported_formats(void) memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT; - ddsd.ddpfPixelFormat = formats[i].fmt; + U4(ddsd).ddpfPixelFormat = formats[i].fmt; ddsd.dwWidth = 4; ddsd.dwHeight = 4; ddsd.ddsCaps.dwCaps = DDSCAPS_TEXTURE | caps[j];