Date: Mon, 23 Feb 2004 23:29:20 -0500
authorSam Lantinga <slouken@libsdl.org>
Fri, 27 Jan 2006 05:36:47 +0000
changeset 12744726fa79ede1
parent 1273 05d5d36b71f4
child 1275 4aa02c3e5e13
Date: Mon, 23 Feb 2004 23:29:20 -0500
From: "Brian Kropf"
Subject: [SDL] Windx5

I was wondering if I could suggest a change for (at least) the mingw/msys
build. Every time I do the ./configure, make on a fresh download it crashes
when it tries to find directx.h for the audio portion of the build

In file included from SDL_dx5audio.c:37:
SDL_dx5audio.h:31:21: directx.h: No such file or directory
In file included from SDL_dx5audio.c:37:

I usually copy the directx.h from the video/windx5 into the audio/windx5 and
things go smoothly after that; just thought I'd suggest it for making future
builds go smoothly. ;)
src/audio/windx5/Makefile.am
src/audio/windx5/directx.h
     1.1 --- a/src/audio/windx5/Makefile.am	Thu Jan 26 08:45:51 2006 +0000
     1.2 +++ b/src/audio/windx5/Makefile.am	Fri Jan 27 05:36:47 2006 +0000
     1.3 @@ -6,4 +6,5 @@
     1.4  
     1.5  # The SDL audio driver sources
     1.6  SRCS =	SDL_dx5audio.c	\
     1.7 -	SDL_dx5audio.h
     1.8 +	SDL_dx5audio.h	\
     1.9 +	directx.h
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/src/audio/windx5/directx.h	Fri Jan 27 05:36:47 2006 +0000
     2.3 @@ -0,0 +1,83 @@
     2.4 +
     2.5 +#ifndef _directx_h
     2.6 +#define _directx_h
     2.7 +
     2.8 +/* Include all of the DirectX 5.0 headers and adds any necessary tweaks */
     2.9 +
    2.10 +#include <windows.h>
    2.11 +#include <mmsystem.h>
    2.12 +#ifndef WIN32
    2.13 +#define WIN32
    2.14 +#endif
    2.15 +#undef  WINNT
    2.16 +
    2.17 +/* Far pointers don't exist in 32-bit code */
    2.18 +#ifndef FAR
    2.19 +#define FAR
    2.20 +#endif
    2.21 +
    2.22 +/* Error codes not yet included in Win32 API header files */
    2.23 +#ifndef MAKE_HRESULT
    2.24 +#define MAKE_HRESULT(sev,fac,code) \
    2.25 +	((HRESULT)(((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))))
    2.26 +#endif
    2.27 +
    2.28 +#ifndef S_OK
    2.29 +#define S_OK		(HRESULT)0x00000000L
    2.30 +#endif
    2.31 +
    2.32 +#ifndef SUCCEEDED
    2.33 +#define SUCCEEDED(x)	((HRESULT)(x) >= 0)
    2.34 +#endif
    2.35 +#ifndef FAILED
    2.36 +#define FAILED(x)	((HRESULT)(x)<0)
    2.37 +#endif
    2.38 +
    2.39 +#ifndef E_FAIL
    2.40 +#define E_FAIL		(HRESULT)0x80000008L
    2.41 +#endif
    2.42 +#ifndef E_NOINTERFACE
    2.43 +#define E_NOINTERFACE	(HRESULT)0x80004002L
    2.44 +#endif
    2.45 +#ifndef E_OUTOFMEMORY
    2.46 +#define E_OUTOFMEMORY	(HRESULT)0x8007000EL
    2.47 +#endif
    2.48 +#ifndef E_INVALIDARG
    2.49 +#define E_INVALIDARG	(HRESULT)0x80070057L
    2.50 +#endif
    2.51 +#ifndef E_NOTIMPL
    2.52 +#define E_NOTIMPL	(HRESULT)0x80004001L
    2.53 +#endif
    2.54 +#ifndef REGDB_E_CLASSNOTREG
    2.55 +#define REGDB_E_CLASSNOTREG	(HRESULT)0x80040154L
    2.56 +#endif
    2.57 +
    2.58 +/* Severity codes */
    2.59 +#ifndef SEVERITY_ERROR
    2.60 +#define SEVERITY_ERROR	1
    2.61 +#endif
    2.62 +
    2.63 +/* Error facility codes */
    2.64 +#ifndef FACILITY_WIN32
    2.65 +#define FACILITY_WIN32	7
    2.66 +#endif
    2.67 +
    2.68 +#ifndef FIELD_OFFSET
    2.69 +#define FIELD_OFFSET(type, field)    ((LONG)&(((type *)0)->field))
    2.70 +#endif
    2.71 +
    2.72 +/* DirectX headers (if it isn't included, I haven't tested it yet)
    2.73 + */
    2.74 +/* We need these defines to mark what version of DirectX API we use */
    2.75 +#define DIRECTDRAW_VERSION  0x0700
    2.76 +#define DIRECTSOUND_VERSION 0x0500
    2.77 +#define DIRECTINPUT_VERSION 0x0500
    2.78 +
    2.79 +#ifdef __GNUC__
    2.80 +#define NONAMELESSUNION
    2.81 +#endif
    2.82 +#include <ddraw.h>
    2.83 +#include <dsound.h>
    2.84 +#include <dinput.h>
    2.85 +
    2.86 +#endif /* _directx_h */