From: nikoli Date: Fri, 26 Jul 2013 08:19:12 +0000 (+0000) Subject: Make cdda optional, server does not need to play music X-Git-Tag: xonotic-v0.8.0~157 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=df3c725784518a26c11f099b9da8f975091a1563;p=xonotic%2Fdarkplaces.git Make cdda optional, server does not need to play music git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11981 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=97b79884ee55276e90c4dd60f9bfde8b9dbbff68 --- diff --git a/BSDmakefile b/BSDmakefile index 74496edc..61189afe 100644 --- a/BSDmakefile +++ b/BSDmakefile @@ -7,7 +7,6 @@ DP_MAKE_TARGET=bsd .endif DP_ARCH != uname - # Makefile name MAKEFILE=BSDmakefile @@ -23,6 +22,16 @@ TARGETS_RELEASE=sv-release cl-release sdl-release TARGETS_RELEASE_PROFILE=sv-release-profile cl-release-profile sdl-release-profile TARGETS_NEXUIZ=sv-nexuiz cl-nexuiz sdl-nexuiz +###### Optional features ##### +DP_CDDA?=enabled +.if $(DP_CDDA) == "enabled" + OBJ_SDLCD=$(OBJ_CD_COMMON) cd_sdl.o + OBJ_BSDCD=$(OBJ_CD_COMMON) cd_bsd.o +.else + OBJ_SDLCD=$(OBJ_CD_COMMON) $(OBJ_NOCD) + OBJ_BSDCD=$(OBJ_CD_COMMON) $(OBJ_NOCD) +.endif + # X11 libs UNIX_X11LIBPATH=/usr/X11R6/lib diff --git a/cl_parse.c b/cl_parse.c index c16b8eaa..0589218a 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -20,7 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // cl_parse.c -- parse a message received from the server #include "quakedef.h" +#ifdef CONFIG_CD #include "cdaudio.h" +#endif #include "cl_collision.h" #include "csprogs.h" #include "libcurl.h" @@ -3608,10 +3610,12 @@ void CL_ParseServerMessage(void) case qw_svc_cdtrack: cl.cdtrack = cl.looptrack = MSG_ReadByte(&cl_message); +#ifdef CONFIG_CD if ( (cls.demoplayback || cls.demorecording) && (cls.forcetrack != -1) ) CDAudio_Play ((unsigned char)cls.forcetrack, true); else CDAudio_Play ((unsigned char)cl.cdtrack, true); +#endif break; case qw_svc_intermission: @@ -3730,10 +3734,12 @@ void CL_ParseServerMessage(void) case qw_svc_setpause: cl.paused = MSG_ReadByte(&cl_message) != 0; +#ifdef CONFIG_CD if (cl.paused) CDAudio_Pause (); else CDAudio_Resume (); +#endif S_PauseGameSounds (cl.paused); break; } @@ -4057,10 +4063,12 @@ void CL_ParseServerMessage(void) case svc_setpause: cl.paused = MSG_ReadByte(&cl_message) != 0; +#ifdef CONFIG_CD if (cl.paused) CDAudio_Pause (); else CDAudio_Resume (); +#endif S_PauseGameSounds (cl.paused); break; @@ -4107,10 +4115,12 @@ void CL_ParseServerMessage(void) case svc_cdtrack: cl.cdtrack = MSG_ReadByte(&cl_message); cl.looptrack = MSG_ReadByte(&cl_message); +#ifdef CONFIG_CD if ( (cls.demoplayback || cls.demorecording) && (cls.forcetrack != -1) ) CDAudio_Play ((unsigned char)cls.forcetrack, true); else CDAudio_Play ((unsigned char)cl.cdtrack, true); +#endif break; case svc_intermission: diff --git a/host.c b/host.c index 0b97a454..b236b0f1 100644 --- a/host.c +++ b/host.c @@ -23,7 +23,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include "libcurl.h" +#ifdef CONFIG_CD #include "cdaudio.h" +#endif #include "cl_video.h" #include "progsvm.h" #include "csprogs.h" @@ -1024,8 +1026,10 @@ void Host_Main(void) else S_Update(&r_refdef.view.matrix); +#ifdef CONFIG_CD CDAudio_Update(); R_TimeReport("audio"); +#endif // reset gathering of mouse input in_mouse_x = in_mouse_y = 0; @@ -1073,7 +1077,9 @@ void Host_StartVideo(void) // make sure we open sockets before opening video because the Windows Firewall "unblock?" dialog can screw up the graphics context on some graphics drivers NetConn_UpdateSockets(); VID_Start(); +#ifdef CONFIG_CD CDAudio_Startup(); +#endif } } @@ -1274,7 +1280,9 @@ static void Host_Init (void) VID_Init(); Render_Init(); S_Init(); +#ifdef CONFIG_CD CDAudio_Init(); +#endif Key_Init(); CL_Init(); } @@ -1410,7 +1418,9 @@ void Host_Shutdown(void) Host_SaveConfig(); +#ifdef CONFIG_CD CDAudio_Shutdown (); +#endif S_Terminate (); Curl_Shutdown (); NetConn_Shutdown (); diff --git a/makefile b/makefile index 1469f7e7..95e3da59 100644 --- a/makefile +++ b/makefile @@ -60,6 +60,20 @@ TARGETS_RELEASE=sv-release cl-release sdl-release TARGETS_RELEASE_PROFILE=sv-release-profile cl-release-profile sdl-release-profile TARGETS_NEXUIZ=sv-nexuiz cl-nexuiz sdl-nexuiz +###### Optional features ##### +DP_CDDA?=enabled +ifeq ($(DP_CDDA), enabled) + OBJ_SDLCD=$(OBJ_CD_COMMON) cd_sdl.o + OBJ_LINUXCD=$(OBJ_CD_COMMON) cd_linux.o + OBJ_BSDCD=$(OBJ_CD_COMMON) cd_bsd.o + OBJ_WINCD=$(OBJ_CD_COMMON) cd_win.o +else + OBJ_SDLCD=$(OBJ_CD_COMMON) $(OBJ_NOCD) + OBJ_LINUXCD=$(OBJ_CD_COMMON) $(OBJ_NOCD) + OBJ_BSDCD=$(OBJ_CD_COMMON) $(OBJ_NOCD) + OBJ_WINCD=$(OBJ_CD_COMMON) $(OBJ_NOCD) +endif + # Linux configuration ifeq ($(DP_MAKE_TARGET), linux) DEFAULT_SNDAPI=ALSA diff --git a/makefile.inc b/makefile.inc index 700f0cde..c3c18ae6 100644 --- a/makefile.inc +++ b/makefile.inc @@ -71,6 +71,7 @@ OBJ_SND_3DRAS=snd_3dras.o LIB_SND_3DRAS= # CD objects +OBJ_CD_COMMON=cd_shared.o OBJ_NOCD=cd_null.o @@ -81,7 +82,6 @@ OBJ_COMMON= \ bih.o \ cap_avi.o \ cap_ogg.o \ - cd_shared.o \ crypto.o \ cl_collision.o \ cl_demo.o \ @@ -166,12 +166,14 @@ OBJ_COMMON= \ # note that builddate.c is very intentionally not compiled to a .o before # being linked, because it should be recompiled every time an executable is # built to give the executable a proper date string -OBJ_SV= builddate.c sys_linux.o vid_null.o thread_null.o $(OBJ_SND_NULL) $(OBJ_NOCD) $(OBJ_COMMON) -OBJ_SDL= builddate.c sys_sdl.o vid_sdl.o thread_sdl.o $(OBJ_SND_COMMON) snd_sdl.o cd_sdl.o $(OBJ_COMMON) +OBJ_SV= builddate.c sys_linux.o vid_null.o thread_null.o $(OBJ_SND_NULL) $(OBJ_COMMON) +OBJ_SDL= builddate.c sys_sdl.o vid_sdl.o thread_sdl.o $(OBJ_SND_COMMON) snd_sdl.o $(OBJ_SDLCD) $(OBJ_COMMON) # Compilation CFLAGS_COMMON=$(CFLAGS_MAKEDEP) $(CFLAGS_PRELOAD) $(CFLAGS_FS) $(CFLAGS_WARNINGS) $(CFLAGS_LIBZ) $(CFLAGS_LIBJPEG) $(CFLAGS_D3D) -D_FILE_OFFSET_BITS=64 -D__KERNEL_STRICT_NAMES -I../../../ +CFLAGS_CLIENT=-DCONFIG_CD +CFLAGS_SERVER= CFLAGS_DEBUG=-ggdb CFLAGS_PROFILE=-g -pg -ggdb -fprofile-arcs CFLAGS_RELEASE= @@ -224,11 +226,6 @@ CMD_UNIXMKDIR=mkdir -p ##### Linux specific variables ##### -# If you want CD sound in Linux -OBJ_LINUXCD=cd_linux.o -# If you want no CD audio -#OBJ_LINUXCD=$(OBJ_NOCD) - # Link LDFLAGS_LINUXCL=$(LDFLAGS_UNIXCOMMON) -lrt -ldl $(LDFLAGS_UNIXCL) LDFLAGS_LINUXSV=$(LDFLAGS_UNIXCOMMON) -lrt -ldl @@ -266,11 +263,6 @@ LDFLAGS_SUNOSSDL=$(LDFLAGS_UNIXCOMMON) -lrt -ldl -lsocket -lnsl $(LDFLAGS_UNIXSD ##### BSD specific variables ##### -#if you want CD sound in BSD -OBJ_BSDCD=cd_bsd.o -#if you want no CD audio -#OBJ_BSDCD=$(OBJ_NOCD) - # Link LDFLAGS_BSDCL=$(LDFLAGS_UNIXCOMMON) -lutil $(LDFLAGS_UNIXCL) LDFLAGS_BSDSV=$(LDFLAGS_UNIXCOMMON) @@ -280,10 +272,6 @@ LDFLAGS_BSDSDL=$(LDFLAGS_UNIXCOMMON) $(LDFLAGS_UNIXSDL) ##### Win32 specific variables ##### WINDRES ?= windres -#if you want CD sound in Win32 -OBJ_WINCD=cd_win.o -#if you want no CD audio -#OBJ_WINCD=$(OBJ_NOCD) OBJ_WGL= builddate.c sys_win.o vid_wgl.o thread_null.o $(OBJ_SND_WIN) $(OBJ_WINCD) $(OBJ_COMMON) @@ -362,77 +350,77 @@ nexuiz : cl-debug : $(MAKE) bin-debug \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - EXE="$(EXE_CL)" LDFLAGS_COMMON="$(LDFLAGS_CL)" LEVEL=1 + EXE="$(EXE_CL)" CFLAGS_FEATURES=$(CFLAGS_CLIENT) LDFLAGS_COMMON="$(LDFLAGS_CL)" LEVEL=1 cl-profile : $(MAKE) bin-profile \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - EXE="$(EXE_CL)" LDFLAGS_COMMON="$(LDFLAGS_CL)" LEVEL=1 + EXE="$(EXE_CL)" CFLAGS_FEATURES=$(CFLAGS_CLIENT) LDFLAGS_COMMON="$(LDFLAGS_CL)" LEVEL=1 cl-release : $(MAKE) bin-release \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - EXE="$(EXE_CL)" LDFLAGS_COMMON="$(LDFLAGS_CL)" LEVEL=1 + EXE="$(EXE_CL)" CFLAGS_FEATURES=$(CFLAGS_CLIENT) LDFLAGS_COMMON="$(LDFLAGS_CL)" LEVEL=1 cl-release-profile : $(MAKE) bin-release-profile \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - EXE="$(EXE_CL)" LDFLAGS_COMMON="$(LDFLAGS_CL)" LEVEL=1 + EXE="$(EXE_CL)" CFLAGS_FEATURES=$(CFLAGS_CLIENT) LDFLAGS_COMMON="$(LDFLAGS_CL)" LEVEL=1 cl-nexuiz : $(MAKE) bin-release \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - EXE="$(EXE_CLNEXUIZ)" LDFLAGS_COMMON="$(LDFLAGS_CL)" LEVEL=1 + EXE="$(EXE_CLNEXUIZ)" CFLAGS_FEATURES=$(CFLAGS_CLIENT) LDFLAGS_COMMON="$(LDFLAGS_CL)" LEVEL=1 sv-debug : $(MAKE) bin-debug \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - EXE="$(EXE_SV)" LDFLAGS_COMMON="$(LDFLAGS_SV)" LEVEL=1 + EXE="$(EXE_SV)" CFLAGS_FEATURES=$(CFLAGS_SERVER) LDFLAGS_COMMON="$(LDFLAGS_SV)" LEVEL=1 sv-profile : $(MAKE) bin-profile \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - EXE="$(EXE_SV)" LDFLAGS_COMMON="$(LDFLAGS_SV)" LEVEL=1 + EXE="$(EXE_SV)" CFLAGS_FEATURES=$(CFLAGS_SERVER) LDFLAGS_COMMON="$(LDFLAGS_SV)" LEVEL=1 sv-release : $(MAKE) bin-release \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - EXE="$(EXE_SV)" LDFLAGS_COMMON="$(LDFLAGS_SV)" LEVEL=1 + EXE="$(EXE_SV)" CFLAGS_FEATURES=$(CFLAGS_SERVER) LDFLAGS_COMMON="$(LDFLAGS_SV)" LEVEL=1 sv-release-profile : $(MAKE) bin-release-profile \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - EXE="$(EXE_SV)" LDFLAGS_COMMON="$(LDFLAGS_SV)" LEVEL=1 + EXE="$(EXE_SV)" CFLAGS_FEATURES=$(CFLAGS_SERVER) LDFLAGS_COMMON="$(LDFLAGS_SV)" LEVEL=1 sv-nexuiz : $(MAKE) bin-release \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - EXE="$(EXE_SVNEXUIZ)" LDFLAGS_COMMON="$(LDFLAGS_SV)" LEVEL=1 + EXE="$(EXE_SVNEXUIZ)" CFLAGS_FEATURES=$(CFLAGS_CLIENT) LDFLAGS_COMMON="$(LDFLAGS_SV)" LEVEL=1 sdl-debug : $(MAKE) bin-debug \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - EXE="$(EXE_SDL)" LDFLAGS_COMMON="$(LDFLAGS_SDL)" LEVEL=1 + EXE="$(EXE_SDL)" CFLAGS_FEATURES=$(CFLAGS_CLIENT) LDFLAGS_COMMON="$(LDFLAGS_SDL)" LEVEL=1 sdl-profile : $(MAKE) bin-profile \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - EXE="$(EXE_SDL)" LDFLAGS_COMMON="$(LDFLAGS_SDL)" LEVEL=1 + EXE="$(EXE_SDL)" CFLAGS_FEATURES=$(CFLAGS_CLIENT) LDFLAGS_COMMON="$(LDFLAGS_SDL)" LEVEL=1 sdl-release : $(MAKE) bin-release \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - EXE="$(EXE_SDL)" LDFLAGS_COMMON="$(LDFLAGS_SDL)" LEVEL=1 + EXE="$(EXE_SDL)" CFLAGS_FEATURES=$(CFLAGS_CLIENT) LDFLAGS_COMMON="$(LDFLAGS_SDL)" LEVEL=1 sdl-release-profile : $(MAKE) bin-release-profile \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - EXE="$(EXE_SDL)" LDFLAGS_COMMON="$(LDFLAGS_SDL)" LEVEL=1 + EXE="$(EXE_SDL)" CFLAGS_FEATURES=$(CFLAGS_CLIENT) LDFLAGS_COMMON="$(LDFLAGS_SDL)" LEVEL=1 sdl-nexuiz : $(MAKE) bin-release \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - EXE="$(EXE_SDLNEXUIZ)" LDFLAGS_COMMON="$(LDFLAGS_SDL)" LEVEL=1 + EXE="$(EXE_SDLNEXUIZ)" CFLAGS_FEATURES=$(CFLAGS_CLIENT) LDFLAGS_COMMON="$(LDFLAGS_SDL)" LEVEL=1 bin-debug : $(CHECKLEVEL1) @@ -441,7 +429,7 @@ bin-debug : $(MAKE) prepare BUILD_DIR=obj/debug/$(EXE) $(MAKE) -C obj/debug/$(EXE) -f ../../../$(MAKEFILE) $(EXE) \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_EXTRA) $(CFLAGS_DEBUG) $(OPTIM_DEBUG)"\ + CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_FEATURES) $(CFLAGS_EXTRA) $(CFLAGS_DEBUG) $(OPTIM_DEBUG)"\ LDFLAGS="$(LDFLAGS_DEBUG) $(LDFLAGS_COMMON)" LEVEL=2 bin-profile : @@ -451,7 +439,7 @@ bin-profile : $(MAKE) prepare BUILD_DIR=obj/profile/$(EXE) $(MAKE) -C obj/profile/$(EXE) -f ../../../$(MAKEFILE) $(EXE) \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_EXTRA) $(CFLAGS_PROFILE) $(OPTIM_RELEASE)"\ + CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_FEATURES) $(CFLAGS_EXTRA) $(CFLAGS_PROFILE) $(OPTIM_RELEASE)"\ LDFLAGS="$(LDFLAGS_PROFILE) $(LDFLAGS_COMMON)" LEVEL=2 bin-release : @@ -461,7 +449,7 @@ bin-release : $(MAKE) prepare BUILD_DIR=obj/release/$(EXE) $(MAKE) -C obj/release/$(EXE) -f ../../../$(MAKEFILE) $(EXE) \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_EXTRA) $(CFLAGS_RELEASE) $(OPTIM_RELEASE)"\ + CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_FEATURES) $(CFLAGS_EXTRA) $(CFLAGS_RELEASE) $(OPTIM_RELEASE)"\ LDFLAGS="$(LDFLAGS_RELEASE) $(LDFLAGS_COMMON)" LEVEL=2 $(STRIP) $(EXE) @@ -472,7 +460,7 @@ bin-release-profile : $(MAKE) prepare BUILD_DIR=obj/release-profile/$(EXE) $(MAKE) -C obj/release-profile/$(EXE) -f ../../../$(MAKEFILE) $(EXE) \ DP_MAKE_TARGET=$(DP_MAKE_TARGET) DP_SOUND_API=$(DP_SOUND_API) \ - CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_EXTRA) $(CFLAGS_RELEASE_PROFILE) $(OPTIM_RELEASE)"\ + CFLAGS="$(CFLAGS_COMMON) $(CFLAGS_FEATURES) $(CFLAGS_EXTRA) $(CFLAGS_RELEASE_PROFILE) $(OPTIM_RELEASE)"\ LDFLAGS="$(LDFLAGS_RELEASE) $(LDFLAGS_COMMON)" LEVEL=2 $(STRIP) $(EXE) diff --git a/menu.c b/menu.c index 184ae366..34a8de7f 100644 --- a/menu.c +++ b/menu.c @@ -18,7 +18,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "quakedef.h" +#ifdef CONFIG_CD #include "cdaudio.h" +#endif #include "image.h" #include "progsvm.h" @@ -1699,7 +1701,9 @@ static void M_Options_Draw (void) M_Options_PrintSlider( " Brightness", true, v_contrast.value, 1, 2); M_Options_PrintSlider( " Gamma", true, v_gamma.value, 0.5, 3); M_Options_PrintSlider( " Sound Volume", snd_initialized.integer, volume.value, 0, 1); +#ifdef CONFIG_CD M_Options_PrintSlider( " Music Volume", cdaudioinitialized.integer, bgmvolume.value, 0, 1); +#endif M_Options_PrintCommand( " Customize Effects", true); M_Options_PrintCommand( " Effects: Quake", true); M_Options_PrintCommand( " Effects: Normal", true); diff --git a/prvm_cmds.c b/prvm_cmds.c index 1c9c8099..00c9ede9 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -2872,7 +2872,9 @@ VM_gettime float gettime(prvm_prog_t *prog) ========= */ +#ifdef CONFIG_CD float CDAudio_GetPosition(void); +#endif void VM_gettime(prvm_prog_t *prog) { int timer_index; @@ -2900,9 +2902,11 @@ void VM_gettime(prvm_prog_t *prog) case 3: // GETTIME_UPTIME PRVM_G_FLOAT(OFS_RETURN) = realtime; break; +#ifdef CONFIG_CD case 4: // GETTIME_CDTRACK PRVM_G_FLOAT(OFS_RETURN) = CDAudio_GetPosition(); break; +#endif default: VM_Warning(prog, "VM_gettime: %s: unsupported timer specified, returning realtime\n", prog->name); PRVM_G_FLOAT(OFS_RETURN) = realtime; diff --git a/snd_main.c b/snd_main.c index ab3ff1ac..ceb230de 100644 --- a/snd_main.c +++ b/snd_main.c @@ -26,7 +26,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "snd_modplug.h" #include "csprogs.h" #include "cl_collision.h" +#ifdef CONFIG_CD #include "cdaudio.h" +#endif #define SND_MIN_SPEED 8000 @@ -1821,8 +1823,10 @@ void S_StopAllSounds (void) if (snd_renderbuffer == NULL) return; +#ifdef CONFIG_CD // stop CD audio because it may be using a faketrack CDAudio_Stop(); +#endif if (simsound || SndSys_LockRenderBuffer ()) { diff --git a/vid_shared.c b/vid_shared.c index 719d6299..df04ab04 100644 --- a/vid_shared.c +++ b/vid_shared.c @@ -1,6 +1,8 @@ #include "quakedef.h" +#ifdef CONFIG_CD #include "cdaudio.h" +#endif #include "image.h" #ifdef SUPPORTD3D diff --git a/vid_wgl.c b/vid_wgl.c index ffa66589..f4279570 100644 --- a/vid_wgl.c +++ b/vid_wgl.c @@ -511,7 +511,9 @@ void Sys_SendKeyEvents (void) } } +#ifdef CONFIG_CD LONG CDAudio_MessageHandler(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); +#endif static keynum_t buttonremap[16] = { @@ -688,7 +690,9 @@ LONG WINAPI MainWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) // break; case MM_MCINOTIFY: +#ifdef CONFIG_CD lRet = CDAudio_MessageHandler (hWnd, uMsg, wParam, lParam); +#endif break; default: