mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-06 05:50:37 +00:00
ddrawex: Fix compilation on systems that don't support nameless unions.
This commit is contained in:
parent
74b5da9a47
commit
a07195bb72
|
@ -15,10 +15,12 @@
|
|||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||
*/
|
||||
#include "wine/debug.h"
|
||||
|
||||
#define COBJMACROS
|
||||
#define NONAMELESSUNION
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "windef.h"
|
||||
#include "winbase.h"
|
||||
#include "wingdi.h"
|
||||
|
||||
|
@ -26,6 +28,7 @@
|
|||
#include "d3d.h"
|
||||
|
||||
#include "ddrawex_private.h"
|
||||
#include "wine/debug.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(ddrawex);
|
||||
|
||||
|
@ -426,21 +429,21 @@ void DDSD_to_DDSD2(const DDSURFACEDESC *in, DDSURFACEDESC2 *out)
|
|||
out->dwFlags = in->dwFlags;
|
||||
if(in->dwFlags & DDSD_WIDTH) out->dwWidth = in->dwWidth;
|
||||
if(in->dwFlags & DDSD_HEIGHT) out->dwHeight = in->dwHeight;
|
||||
if(in->dwFlags & DDSD_PIXELFORMAT) out->ddpfPixelFormat = in->ddpfPixelFormat;
|
||||
if(in->dwFlags & DDSD_PIXELFORMAT) out->u4.ddpfPixelFormat = in->ddpfPixelFormat;
|
||||
if(in->dwFlags & DDSD_CAPS) out->ddsCaps.dwCaps = in->ddsCaps.dwCaps;
|
||||
if(in->dwFlags & DDSD_PITCH) out->lPitch = in->lPitch;
|
||||
if(in->dwFlags & DDSD_PITCH) out->u1.lPitch = in->u1.lPitch;
|
||||
if(in->dwFlags & DDSD_BACKBUFFERCOUNT) out->dwBackBufferCount = in->dwBackBufferCount;
|
||||
if(in->dwFlags & DDSD_ZBUFFERBITDEPTH) out->dwMipMapCount = in->dwZBufferBitDepth; /* same union */
|
||||
if(in->dwFlags & DDSD_ZBUFFERBITDEPTH) out->u2.dwMipMapCount = in->u2.dwZBufferBitDepth; /* same union */
|
||||
if(in->dwFlags & DDSD_ALPHABITDEPTH) out->dwAlphaBitDepth = in->dwAlphaBitDepth;
|
||||
/* DDraw(native, and wine) does not set the DDSD_LPSURFACE, so always copy */
|
||||
out->lpSurface = in->lpSurface;
|
||||
if(in->dwFlags & DDSD_CKDESTOVERLAY) out->ddckCKDestOverlay = in->ddckCKDestOverlay;
|
||||
if(in->dwFlags & DDSD_CKDESTOVERLAY) out->u3.ddckCKDestOverlay = in->ddckCKDestOverlay;
|
||||
if(in->dwFlags & DDSD_CKDESTBLT) out->ddckCKDestBlt = in->ddckCKDestBlt;
|
||||
if(in->dwFlags & DDSD_CKSRCOVERLAY) out->ddckCKSrcOverlay = in->ddckCKSrcOverlay;
|
||||
if(in->dwFlags & DDSD_CKSRCBLT) out->ddckCKSrcBlt = in->ddckCKSrcBlt;
|
||||
if(in->dwFlags & DDSD_MIPMAPCOUNT) out->dwMipMapCount = in->dwMipMapCount;
|
||||
if(in->dwFlags & DDSD_REFRESHRATE) out->dwRefreshRate = in->dwRefreshRate;
|
||||
if(in->dwFlags & DDSD_LINEARSIZE) out->dwLinearSize = in->dwLinearSize;
|
||||
if(in->dwFlags & DDSD_MIPMAPCOUNT) out->u2.dwMipMapCount = in->u2.dwMipMapCount;
|
||||
if(in->dwFlags & DDSD_REFRESHRATE) out->u2.dwRefreshRate = in->u2.dwRefreshRate;
|
||||
if(in->dwFlags & DDSD_LINEARSIZE) out->u1.dwLinearSize = in->u1.dwLinearSize;
|
||||
/* Does not exist in DDSURFACEDESC:
|
||||
* DDSD_TEXTURESTAGE, DDSD_FVF, DDSD_SRCVBHANDLE,
|
||||
*/
|
||||
|
@ -453,21 +456,21 @@ void DDSD2_to_DDSD(const DDSURFACEDESC2 *in, DDSURFACEDESC *out)
|
|||
out->dwFlags = in->dwFlags;
|
||||
if(in->dwFlags & DDSD_WIDTH) out->dwWidth = in->dwWidth;
|
||||
if(in->dwFlags & DDSD_HEIGHT) out->dwHeight = in->dwHeight;
|
||||
if(in->dwFlags & DDSD_PIXELFORMAT) out->ddpfPixelFormat = in->ddpfPixelFormat;
|
||||
if(in->dwFlags & DDSD_PIXELFORMAT) out->ddpfPixelFormat = in->u4.ddpfPixelFormat;
|
||||
if(in->dwFlags & DDSD_CAPS) out->ddsCaps.dwCaps = in->ddsCaps.dwCaps;
|
||||
if(in->dwFlags & DDSD_PITCH) out->lPitch = in->lPitch;
|
||||
if(in->dwFlags & DDSD_PITCH) out->u1.lPitch = in->u1.lPitch;
|
||||
if(in->dwFlags & DDSD_BACKBUFFERCOUNT) out->dwBackBufferCount = in->dwBackBufferCount;
|
||||
if(in->dwFlags & DDSD_ZBUFFERBITDEPTH) out->dwZBufferBitDepth = in->dwMipMapCount; /* same union */
|
||||
if(in->dwFlags & DDSD_ZBUFFERBITDEPTH) out->u2.dwZBufferBitDepth = in->u2.dwMipMapCount; /* same union */
|
||||
if(in->dwFlags & DDSD_ALPHABITDEPTH) out->dwAlphaBitDepth = in->dwAlphaBitDepth;
|
||||
/* DDraw(native, and wine) does not set the DDSD_LPSURFACE, so always copy */
|
||||
out->lpSurface = in->lpSurface;
|
||||
if(in->dwFlags & DDSD_CKDESTOVERLAY) out->ddckCKDestOverlay = in->ddckCKDestOverlay;
|
||||
if(in->dwFlags & DDSD_CKDESTOVERLAY) out->ddckCKDestOverlay = in->u3.ddckCKDestOverlay;
|
||||
if(in->dwFlags & DDSD_CKDESTBLT) out->ddckCKDestBlt = in->ddckCKDestBlt;
|
||||
if(in->dwFlags & DDSD_CKSRCOVERLAY) out->ddckCKSrcOverlay = in->ddckCKSrcOverlay;
|
||||
if(in->dwFlags & DDSD_CKSRCBLT) out->ddckCKSrcBlt = in->ddckCKSrcBlt;
|
||||
if(in->dwFlags & DDSD_MIPMAPCOUNT) out->dwMipMapCount = in->dwMipMapCount;
|
||||
if(in->dwFlags & DDSD_REFRESHRATE) out->dwRefreshRate = in->dwRefreshRate;
|
||||
if(in->dwFlags & DDSD_LINEARSIZE) out->dwLinearSize = in->dwLinearSize;
|
||||
if(in->dwFlags & DDSD_MIPMAPCOUNT) out->u2.dwMipMapCount = in->u2.dwMipMapCount;
|
||||
if(in->dwFlags & DDSD_REFRESHRATE) out->u2.dwRefreshRate = in->u2.dwRefreshRate;
|
||||
if(in->dwFlags & DDSD_LINEARSIZE) out->u1.dwLinearSize = in->u1.dwLinearSize;
|
||||
/* Does not exist in DDSURFACEDESC:
|
||||
* DDSD_TEXTURESTAGE, DDSD_FVF, DDSD_SRCVBHANDLE,
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue