The recent include/wine/wined3d_types.h changes

Gerald Pfeifer gerald at
Fri Aug 26 11:02:46 CDT 2005

The following patch to include/wine/wined3d_types.h

  revision 1.8
  date: 2005/08/23 09:34:57;  author: julliard;  state: Exp;  lines: +2 -2
  Oliver Stieber <oliver_stieber at>
  Tidy up d3d9 and finalize passing d3d9 calls to wined3d for now.

  @@ -401,7 +401,7 @@ typedef struct _WINED3DADAPTER_IDENTIFIE
   typedef struct _WINED3DPRESENT_PARAMETERS {
       UINT                *BackBufferWidth;
       UINT                *BackBufferHeight;
  -    D3DFORMAT           *BackBufferFormat;
  +    WINED3DFORMAT       *BackBufferFormat;
       UINT                *BackBufferCount;
       D3DMULTISAMPLE_TYPE *MultiSampleType;
       DWORD               *MultiSampleQuality;
  @@ -409,7 +409,7 @@ typedef struct _WINED3DPRESENT_PARAMETER
       HWND                *hDeviceWindow;
       BOOL                *Windowed;
       BOOL                *EnableAutoDepthStencil;
  -    D3DFORMAT           *AutoDepthStencilFormat;
  +    WINED3DFORMAT       *AutoDepthStencilFormat;
       DWORD               *Flags;
       UINT                *FullScreen_RefreshRateInHz;
       UINT                *PresentationInterval;

triggers the following warning in IDirect3D8Impl_CreateDevice():

  directx.c:670: warning: assignment from incompatible pointer type
  directx.c:678: warning: assignment from incompatible pointer type

These two lines are

  localParameters.BackBufferFormat = &pPresentationParameters->BackBufferFormat;
  localParameters.AutoDepthStencilFormat = &pPresentationParameters->AutoDepthStencilFormat;  

and the two variables have the following types

  D3DPRESENT_PARAMETERS* pPresentationParameters
  (from include/wine/wined3d_types.h

  (from include/d3d8types.h)

Interestingly, I did not see this on SUSE Linux 9.3, but FreeBSD 4.11 
(XFree86) and 5.4 (

Both  D3DFORMAT and WINED3DFORMAT are enums, so indeed assigning one
to the other seems a bit strange, if not dangerous.  Is the change
as such really correct?


More information about the wine-devel mailing list