=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: amstream: Fix compilation on systems that don't support nameless unions.

Alexandre Julliard julliard at winehq.org
Thu Jul 20 12:11:30 CDT 2017


Module: wine
Branch: stable
Commit: 1c6e344bbbb2a45983f19d5ec96789c9ad1f84ae
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=1c6e344bbbb2a45983f19d5ec96789c9ad1f84ae

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Wed May 10 16:20:52 2017 +0200

amstream: Fix compilation on systems that don't support nameless unions.

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
(cherry picked from commit e8e23114a220bcb3c7966e5fba541a2b3823f0f7)
Signed-off-by: Michael Stefaniuc <mstefani at winehq.org>

---

 dlls/amstream/mediastream.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/dlls/amstream/mediastream.c b/dlls/amstream/mediastream.c
index 188ab88..53556af 100644
--- a/dlls/amstream/mediastream.c
+++ b/dlls/amstream/mediastream.c
@@ -18,16 +18,19 @@
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  */
 
-#include "wine/debug.h"
-
+#define NONAMELESSUNION
+#define NONAMELESSSTRUCT
 #define COBJMACROS
 
+#include <stdarg.h>
+#include "windef.h"
 #include "winbase.h"
 #include "wingdi.h"
 
 #include "amstream_private.h"
 
 #include "ddstream.h"
+#include "wine/debug.h"
 
 WINE_DEFAULT_DEBUG_CHANNEL(amstream);
 
@@ -1021,11 +1024,11 @@ static HRESULT ddrawstreamsample_create(IDirectDrawMediaStream *parent, IDirectD
         desc.dwWidth = 100;
         desc.ddpfPixelFormat.dwSize = sizeof(desc.ddpfPixelFormat);
         desc.ddpfPixelFormat.dwFlags = DDPF_RGB;
-        desc.ddpfPixelFormat.dwRGBBitCount = 32;
-        desc.ddpfPixelFormat.dwRBitMask = 0xff0000;
-        desc.ddpfPixelFormat.dwGBitMask = 0x00ff00;
-        desc.ddpfPixelFormat.dwBBitMask = 0x0000ff;
-        desc.ddpfPixelFormat.dwRGBAlphaBitMask = 0;
+        desc.ddpfPixelFormat.u1.dwRGBBitCount = 32;
+        desc.ddpfPixelFormat.u2.dwRBitMask = 0xff0000;
+        desc.ddpfPixelFormat.u3.dwGBitMask = 0x00ff00;
+        desc.ddpfPixelFormat.u4.dwBBitMask = 0x0000ff;
+        desc.ddpfPixelFormat.u5.dwRGBAlphaBitMask = 0;
         desc.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN;
         desc.lpSurface = NULL;
 




More information about the wine-cvs mailing list