mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
Replace uses of the HAVE_DS and HAVE_SDL preprocessor macros with MIXERTYPEWIN and MIXERTYPESDL.
git-svn-id: https://svn.eduke32.com/eduke32@5780 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
4afd27e16f
commit
3dba49a1e3
7 changed files with 10 additions and 34 deletions
|
@ -13,7 +13,7 @@ LOCAL_MODULE := duke3d
|
|||
COMMONFLAGS := -x c++ -std=gnu++11 -fvisibility=hidden -fPIC -funsigned-char -fno-strict-aliasing -pthread \
|
||||
-W -Wall -Wextra -Wpointer-arith -Wno-char-subscripts -Wno-missing-braces -Wwrite-strings -Wuninitialized \
|
||||
-Wno-attributes -Wno-strict-overflow -Wno-unused-result -Wlogical-op -Wcast-qual -Werror=return-type \
|
||||
-DHAVE_SDL -DHAVE_VORBIS -DHAVE_JWZGLES -DHAVE_ANDROID -DRENDERTYPESDL=1 -DUSE_OPENGL -DNETCODE_DISABLE -DUSE_LIBVPX \
|
||||
-DHAVE_VORBIS -DHAVE_JWZGLES -DHAVE_ANDROID -DRENDERTYPESDL=1 -DMIXERTYPESDL=1 -DUSE_OPENGL -DNETCODE_DISABLE -DUSE_LIBVPX \
|
||||
-DHAVE_INTTYPES -D_GNU_SOURCE=1 -D_REENTRANT
|
||||
|
||||
ifeq ($(FOUND_CLANG),1)
|
||||
|
|
|
@ -167,17 +167,15 @@ AUDIOLIB_CFLAGS=-I$(AUDIOLIB_ROOT)/third-party/common/include
|
|||
|
||||
ifeq ($(PLATFORM),WINDOWS)
|
||||
ifeq ($(MIXERTYPE),WIN)
|
||||
AUDIOLIB_CFLAGS+= -DHAVE_DS
|
||||
AUDIOLIB_OBJS+= driver_directsound
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(MIXERTYPE),SDL)
|
||||
AUDIOLIB_CFLAGS+= -DHAVE_SDL
|
||||
ifneq ($(PLATFORM),DARWIN)
|
||||
ifneq ($(PLATFORM),WINDOWS)
|
||||
ifneq ($(PLATFORM),WII)
|
||||
AUDIOLIB_CFLAGS+=`pkg-config --cflags vorbis`
|
||||
AUDIOLIB_CFLAGS+=`$(PKG_CONFIG) --cflags vorbis`
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
|
|
@ -257,12 +257,10 @@ DUKE3D_EDITOR_OBJS=$(DUKE3D_EDITOR_OBJS) $(DUKE3D_OBJ)\build_icon.$o
|
|||
!if ("$(MIXERTYPE)"=="WIN")
|
||||
DUKE3D_OBJS=$(DUKE3D_OBJS) $(DUKE3D_OBJ)\midi.$o $(DUKE3D_OBJ)\music.$o $(DUKE3D_OBJ)\mpu401.$o
|
||||
AUDIOLIB_OBJS=$(AUDIOLIB_OBJS) $(AUDIOLIB_OBJ)\driver_directsound.$o
|
||||
AUDIOLIB_CFLAGS=$(AUDIOLIB_CFLAGS) /DHAVE_DS
|
||||
!endif
|
||||
!if ("$(MIXERTYPE)"=="SDL")
|
||||
DUKE3D_OBJS=$(DUKE3D_OBJS) $(DUKE3D_OBJ)\sdlmusic.$o
|
||||
AUDIOLIB_OBJS=$(AUDIOLIB_OBJS) $(AUDIOLIB_OBJ)/driver_sdl.$o
|
||||
AUDIOLIB_CFLAGS=$(AUDIOLIB_CFLAGS) /DHAVE_SDL
|
||||
!endif
|
||||
|
||||
DUKE3D_OBJS=$(DUKE3D_OBJS) $(MUSICOBJ)
|
||||
|
|
|
@ -2344,7 +2344,6 @@
|
|||
"-DUSE_OPENGL",
|
||||
"-DPOLYMER",
|
||||
"-DHAS_SOCKLEN_T",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DHAVE_VORBIS",
|
||||
|
@ -2459,7 +2458,6 @@
|
|||
"-DUSE_OPENGL",
|
||||
"-DPOLYMER",
|
||||
"-DHAS_SOCKLEN_T",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DHAVE_VORBIS",
|
||||
|
@ -2580,7 +2578,6 @@
|
|||
"-DUSE_OPENGL",
|
||||
"-DPOLYMER",
|
||||
"-DHAS_SOCKLEN_T",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DHAVE_VORBIS",
|
||||
|
@ -2695,7 +2692,6 @@
|
|||
"-DUSE_OPENGL",
|
||||
"-DPOLYMER",
|
||||
"-DHAS_SOCKLEN_T",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DHAVE_VORBIS",
|
||||
|
@ -2807,7 +2803,6 @@
|
|||
"-DUSE_OPENGL",
|
||||
"-DPOLYMER",
|
||||
"-DHAS_SOCKLEN_T",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DHAVE_VORBIS",
|
||||
|
@ -2911,7 +2906,6 @@
|
|||
"-DUSE_OPENGL",
|
||||
"-DPOLYMER",
|
||||
"-DHAS_SOCKLEN_T",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DHAVE_VORBIS",
|
||||
|
@ -3018,7 +3012,6 @@
|
|||
"-DUSE_OPENGL",
|
||||
"-DPOLYMER",
|
||||
"-DHAS_SOCKLEN_T",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DHAVE_VORBIS",
|
||||
|
@ -3119,7 +3112,6 @@
|
|||
"-DUSE_OPENGL",
|
||||
"-DPOLYMER",
|
||||
"-DHAS_SOCKLEN_T",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DHAVE_VORBIS",
|
||||
|
@ -3225,7 +3217,6 @@
|
|||
"-DUSE_OPENGL",
|
||||
"-DPOLYMER",
|
||||
"-DHAS_SOCKLEN_T",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DHAVE_VORBIS",
|
||||
|
@ -3325,7 +3316,6 @@
|
|||
"-DUSE_OPENGL",
|
||||
"-DPOLYMER",
|
||||
"-DHAS_SOCKLEN_T",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DHAVE_VORBIS",
|
||||
|
@ -3464,7 +3454,6 @@
|
|||
"-DUSE_OPENGL",
|
||||
"-DPOLYMER",
|
||||
"-DHAS_SOCKLEN_T",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DHAVE_VORBIS",
|
||||
|
@ -3565,7 +3554,6 @@
|
|||
"-DUSE_OPENGL",
|
||||
"-DPOLYMER",
|
||||
"-DHAS_SOCKLEN_T",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DHAVE_VORBIS",
|
||||
|
@ -3675,7 +3663,6 @@
|
|||
"-DMIXERTYPESDL=1",
|
||||
"-DUSE_OPENGL",
|
||||
"-DHAVE_JWZGLES",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DNETCODE_DISABLE",
|
||||
|
@ -3787,7 +3774,6 @@
|
|||
"-DMIXERTYPESDL=1",
|
||||
"-DUSE_OPENGL",
|
||||
"-DHAVE_JWZGLES",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DNETCODE_DISABLE",
|
||||
|
@ -3899,7 +3885,6 @@
|
|||
"-DMIXERTYPESDL=1",
|
||||
"-DUSE_OPENGL",
|
||||
"-DHAVE_JWZGLES",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DNETCODE_DISABLE",
|
||||
|
@ -4006,7 +3991,6 @@
|
|||
"-DMIXERTYPESDL=1",
|
||||
"-DUSE_OPENGL",
|
||||
"-DHAVE_JWZGLES",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DNETCODE_DISABLE",
|
||||
|
@ -4114,7 +4098,6 @@
|
|||
"-DMIXERTYPESDL=1",
|
||||
"-DUSE_OPENGL",
|
||||
"-DHAVE_JWZGLES",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DNETCODE_DISABLE",
|
||||
|
@ -4218,7 +4201,6 @@
|
|||
"-DMIXERTYPESDL=1",
|
||||
"-DUSE_OPENGL",
|
||||
"-DHAVE_JWZGLES",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DNETCODE_DISABLE",
|
||||
|
@ -4326,7 +4308,6 @@
|
|||
"-DMIXERTYPESDL=1",
|
||||
"-DUSE_OPENGL",
|
||||
"-DHAVE_JWZGLES",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DNETCODE_DISABLE",
|
||||
|
@ -4430,7 +4411,6 @@
|
|||
"-DMIXERTYPESDL=1",
|
||||
"-DUSE_OPENGL",
|
||||
"-DHAVE_JWZGLES",
|
||||
"-DHAVE_SDL",
|
||||
"-DUSING_LTO",
|
||||
"-DNOASM",
|
||||
"-DNETCODE_DISABLE",
|
||||
|
|
|
@ -26,9 +26,9 @@
|
|||
typedef enum
|
||||
{
|
||||
ASS_NoSound,
|
||||
#if defined HAVE_DS
|
||||
#if defined MIXERTYPEWIN
|
||||
ASS_DirectSound,
|
||||
#elif defined HAVE_SDL
|
||||
#elif defined MIXERTYPESDL
|
||||
ASS_SDL,
|
||||
#endif
|
||||
ASS_NumSoundCards,
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
|
||||
#include "driver_nosound.h"
|
||||
|
||||
#if defined HAVE_DS
|
||||
#if defined MIXERTYPEWIN
|
||||
# include "driver_directsound.h"
|
||||
#elif defined HAVE_SDL
|
||||
#elif defined MIXERTYPESDL
|
||||
# include "driver_sdl.h"
|
||||
#endif
|
||||
|
||||
|
@ -56,14 +56,14 @@ static struct
|
|||
},
|
||||
|
||||
// Windows DirectSound
|
||||
#if defined HAVE_DS
|
||||
#if defined MIXERTYPEWIN
|
||||
{
|
||||
DirectSoundDrv_GetError, DirectSoundDrv_ErrorString, DirectSoundDrv_PCM_Init, DirectSoundDrv_PCM_Shutdown,
|
||||
DirectSoundDrv_PCM_BeginPlayback, DirectSoundDrv_PCM_StopPlayback, DirectSoundDrv_PCM_Lock,
|
||||
DirectSoundDrv_PCM_Unlock,
|
||||
},
|
||||
// Simple DirectMedia Layer
|
||||
#elif defined HAVE_SDL
|
||||
#elif defined MIXERTYPESDL
|
||||
{
|
||||
SDLDrv_GetError, SDLDrv_ErrorString, SDLDrv_PCM_Init, SDLDrv_PCM_Shutdown,
|
||||
SDLDrv_PCM_BeginPlayback, SDLDrv_PCM_StopPlayback, SDLDrv_PCM_Lock, SDLDrv_PCM_Unlock,
|
||||
|
|
|
@ -82,9 +82,9 @@ int32_t FX_Init(int32_t SoundCard, int32_t numvoices, int32_t numchannels, unsig
|
|||
|
||||
if (SoundCard == ASS_AutoDetect)
|
||||
{
|
||||
#if defined HAVE_DS
|
||||
#if defined MIXERTYPEWIN
|
||||
SoundCard = ASS_DirectSound;
|
||||
#elif defined HAVE_SDL
|
||||
#elif defined MIXERTYPESDL
|
||||
SoundCard = ASS_SDL;
|
||||
#else
|
||||
#warning No sound driver selected!
|
||||
|
|
Loading…
Reference in a new issue