]> git.0x19.co - doomgeneric-snom360/commitdiff
Added missing include guards for compiling without SDL/sound.
authorindigoparadox <indigo.repo@interfinitydynamics.info>
Fri, 30 Dec 2022 21:45:28 +0000 (16:45 -0500)
committerindigoparadox <indigo.repo@interfinitydynamics.info>
Fri, 30 Dec 2022 21:45:28 +0000 (16:45 -0500)
doomgeneric/i_sound.c
doomgeneric/i_swap.h

index ade161dea56c70015be07582f35047af98dc76f8..9fd314b5c5652a7c13e4308af62c0cf208dbb6b9 100644 (file)
@@ -65,7 +65,9 @@ int snd_sfxdevice = SNDDEVICE_SB;
 extern void I_InitTimidityConfig(void);
 extern sound_module_t sound_sdl_module;
 extern sound_module_t sound_pcsound_module;
+#ifdef FEATURE_SOUND
 extern music_module_t music_sdl_module;
+#endif /* FEATURE_SOUND */
 extern music_module_t music_opl_module;
 
 // For OPL module:
@@ -158,7 +160,9 @@ static void InitMusicModule(void)
 {
     int i;
 
+#ifdef FEATURE_SOUND
     music_module = &music_sdl_module; return;
+#endif /* FEATURE_SOUND */
 
     /*for (i=0; music_modules[i] != NULL; ++i)
     {
index 0dbcdb5e7e7420ba7e51d980b1633e6eed6724e3..fce6a0066de3b42b1d9930634f10c5cc0448d22b 100644 (file)
@@ -20,6 +20,8 @@
 #ifndef __I_SWAP__
 #define __I_SWAP__
 
+#ifdef FEATURE_SOUND
+
 #include <SDL2/SDL_endian.h>
 
 // Endianess handling.
 #define doom_wtohs(x) (short int)(x)
 #endif
 
+#else
+       
+#define SHORT(x)  ((signed short) (x))
+#define LONG(x)   ((signed int) (x))
+
+#define SYS_LITTLE_ENDIAN
+
+#endif /* FEATURE_SOUND */
+
 #endif