src/audio/directsound/directx.h
author Sam Lantinga
Sat, 06 Oct 2012 11:23:47 -0700
changeset 6565 1f3c0df426dc
parent 5587 9c554d44ea66
child 7191 75360622e65f
permissions -rw-r--r--
When using Xinerama, XVidMode always works on screen 0. Otherwise use the real X11 screen.
slouken@1274
     1
slouken@1274
     2
#ifndef _directx_h
slouken@1274
     3
#define _directx_h
slouken@1274
     4
icculus@5587
     5
/* Include all of the DirectX 8.0 headers and adds any necessary tweaks */
slouken@1274
     6
slouken@5090
     7
#include "../../core/windows/SDL_windows.h"
slouken@1274
     8
#include <mmsystem.h>
slouken@1274
     9
#ifndef WIN32
slouken@1274
    10
#define WIN32
slouken@1274
    11
#endif
slouken@1274
    12
#undef  WINNT
slouken@1274
    13
slouken@1274
    14
/* Far pointers don't exist in 32-bit code */
slouken@1274
    15
#ifndef FAR
slouken@1274
    16
#define FAR
slouken@1274
    17
#endif
slouken@1274
    18
slouken@1274
    19
/* Error codes not yet included in Win32 API header files */
slouken@1274
    20
#ifndef MAKE_HRESULT
slouken@1274
    21
#define MAKE_HRESULT(sev,fac,code) \
slouken@1274
    22
	((HRESULT)(((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))))
slouken@1274
    23
#endif
slouken@1274
    24
slouken@1274
    25
#ifndef S_OK
slouken@1274
    26
#define S_OK		(HRESULT)0x00000000L
slouken@1274
    27
#endif
slouken@1274
    28
slouken@1274
    29
#ifndef SUCCEEDED
slouken@1274
    30
#define SUCCEEDED(x)	((HRESULT)(x) >= 0)
slouken@1274
    31
#endif
slouken@1274
    32
#ifndef FAILED
slouken@1274
    33
#define FAILED(x)	((HRESULT)(x)<0)
slouken@1274
    34
#endif
slouken@1274
    35
slouken@1274
    36
#ifndef E_FAIL
slouken@1274
    37
#define E_FAIL		(HRESULT)0x80000008L
slouken@1274
    38
#endif
slouken@1274
    39
#ifndef E_NOINTERFACE
slouken@1274
    40
#define E_NOINTERFACE	(HRESULT)0x80004002L
slouken@1274
    41
#endif
slouken@1274
    42
#ifndef E_OUTOFMEMORY
slouken@1274
    43
#define E_OUTOFMEMORY	(HRESULT)0x8007000EL
slouken@1274
    44
#endif
slouken@1274
    45
#ifndef E_INVALIDARG
slouken@1274
    46
#define E_INVALIDARG	(HRESULT)0x80070057L
slouken@1274
    47
#endif
slouken@1274
    48
#ifndef E_NOTIMPL
slouken@1274
    49
#define E_NOTIMPL	(HRESULT)0x80004001L
slouken@1274
    50
#endif
slouken@1274
    51
#ifndef REGDB_E_CLASSNOTREG
slouken@1274
    52
#define REGDB_E_CLASSNOTREG	(HRESULT)0x80040154L
slouken@1274
    53
#endif
slouken@1274
    54
slouken@1274
    55
/* Severity codes */
slouken@1274
    56
#ifndef SEVERITY_ERROR
slouken@1274
    57
#define SEVERITY_ERROR	1
slouken@1274
    58
#endif
slouken@1274
    59
slouken@1274
    60
/* Error facility codes */
slouken@1274
    61
#ifndef FACILITY_WIN32
slouken@1274
    62
#define FACILITY_WIN32	7
slouken@1274
    63
#endif
slouken@1274
    64
slouken@1274
    65
#ifndef FIELD_OFFSET
slouken@1274
    66
#define FIELD_OFFSET(type, field)    ((LONG)&(((type *)0)->field))
slouken@1274
    67
#endif
slouken@1274
    68
slouken@1274
    69
/* DirectX headers (if it isn't included, I haven't tested it yet)
slouken@1274
    70
 */
slouken@1274
    71
/* We need these defines to mark what version of DirectX API we use */
slouken@1274
    72
#define DIRECTDRAW_VERSION  0x0700
icculus@5587
    73
#define DIRECTSOUND_VERSION 0x0800
slouken@1274
    74
#define DIRECTINPUT_VERSION 0x0500
slouken@1274
    75
slouken@1274
    76
#include <ddraw.h>
slouken@1274
    77
#include <dsound.h>
slouken@1274
    78
#include <dinput.h>
slouken@1274
    79
slouken@1274
    80
#endif /* _directx_h */
slouken@1895
    81
/* vi: set ts=4 sw=4 expandtab: */