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

Francois Gouget fgouget at free.fr
Tue Jul 31 11:59:43 CDT 2007


---

Note that including wine/debug.h too early makes the #define 
NONAMELESSUNION ineffective. Anyway, wine/debug.h should be included 
last so we know that no other header depends on it.

 dlls/dxdiagn/provider.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c
index fe0543c..c30600b 100644
--- a/dlls/dxdiagn/provider.c
+++ b/dlls/dxdiagn/provider.c
@@ -20,9 +20,9 @@
  */
 
 #include "config.h"
-#include "wine/debug.h"
 
 #define COBJMACROS
+#define NONAMELESSUNION
 #include "dxdiag_private.h"
 #include "wine/unicode.h"
 #include "winver.h"
@@ -33,6 +33,8 @@
 #include "mmddk.h"
 #include <ddraw.h>
 
+#include "wine/debug.h"
+
 WINE_DEFAULT_DEBUG_CHANNEL(dxdiag);
 
 /* IDxDiagProvider IUnknown parts follow: */
@@ -478,7 +480,7 @@ static HRESULT DXDiag_InitDXDiagDisplayContainer(IDxDiagContainer* pSubCont)
         if (surface_descr.dwFlags & DDSD_HEIGHT)
             add_prop_ui4( pDisplayAdapterSubCont, dwHeight, surface_descr.dwHeight );
         if (surface_descr.dwFlags & DDSD_PIXELFORMAT)
-            add_prop_ui4( pDisplayAdapterSubCont, dwBpp, surface_descr.ddpfPixelFormat.dwRGBBitCount );
+            add_prop_ui4( pDisplayAdapterSubCont, dwBpp, surface_descr.u4.ddpfPixelFormat.u1.dwRGBBitCount );
     }
 
     add_prop_str( pDisplayAdapterSubCont, szVendorId, szEmpty );
-- 
1.4.4.4




More information about the wine-patches mailing list