Skip to content

Commit b321777

Browse files
indigoparadoxCacodemon345
authored andcommitted
Added missing include guards for compiling without SDL/sound.
1 parent 34f8cd4 commit b321777

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

doomgeneric/i_sound.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ int snd_sfxdevice = SNDDEVICE_SB;
6565
extern void I_InitTimidityConfig(void);
6666
extern sound_module_t sound_sdl_module;
6767
extern sound_module_t sound_pcsound_module;
68+
#ifdef FEATURE_SOUND
6869
extern music_module_t music_sdl_module;
70+
#endif /* FEATURE_SOUND */
6971
extern music_module_t music_opl_module;
7072

7173
// For OPL module:
@@ -158,7 +160,9 @@ static void InitMusicModule(void)
158160
{
159161
int i;
160162

163+
#ifdef FEATURE_SOUND
161164
music_module = &music_sdl_module; return;
165+
#endif /* FEATURE_SOUND */
162166

163167
/*for (i=0; music_modules[i] != NULL; ++i)
164168
{

doomgeneric/i_swap.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
#ifndef __I_SWAP__
2121
#define __I_SWAP__
2222

23+
#ifdef FEATURE_SOUND
24+
2325
#include <SDL2/SDL_endian.h>
2426

2527
// Endianess handling.
@@ -53,5 +55,14 @@
5355
#define doom_wtohs(x) (short int)(x)
5456
#endif
5557

58+
#else
59+
60+
#define SHORT(x) ((signed short) (x))
61+
#define LONG(x) ((signed int) (x))
62+
63+
#define SYS_LITTLE_ENDIAN
64+
65+
#endif /* FEATURE_SOUND */
66+
5667
#endif
5768

0 commit comments

Comments
 (0)