Skip to content

Commit 4e37793

Browse files
authored
Add missing FluidSynth checks, consistency tweak (#2109)
* Add missing FluidSynth check * Fix check inconsistency * Add more missing checks
1 parent f2fa2bc commit 4e37793

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/i_oalmusic.c

+6-2
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,11 @@ static boolean I_OAL_InitMusic(int device)
439439
return false;
440440
}
441441

442-
static int fl_gain, opl_gain;
442+
#if defined(HAVE_FLUIDSYNTH)
443+
static int fl_gain;
444+
#endif
445+
446+
static int opl_gain;
443447

444448
static void I_OAL_SetMusicVolume(int volume)
445449
{
@@ -609,7 +613,7 @@ static const char **I_OAL_DeviceList(void)
609613

610614
static midiplayertype_t I_OAL_MidiPlayerType(void)
611615
{
612-
#ifdef HAVE_FLUIDSYNTH
616+
#if defined (HAVE_FLUIDSYNTH)
613617
if (active_module == &stream_fl_module)
614618
{
615619
return midiplayer_fluidsynth;

src/mn_setup.c

+5
Original file line numberDiff line numberDiff line change
@@ -2492,13 +2492,15 @@ static void SetMidiPlayerOpl(void)
24922492
}
24932493
}
24942494

2495+
#if defined(HAVE_FLUIDSYNTH)
24952496
static void SetMidiPlayerFluidSynth(void)
24962497
{
24972498
if (I_MidiPlayerType() == midiplayer_fluidsynth)
24982499
{
24992500
SetMidiPlayer();
25002501
}
25012502
}
2503+
#endif
25022504

25032505
static void RestartMusic(void)
25042506
{
@@ -2653,7 +2655,10 @@ static setup_menu_t music_settings1[] = {
26532655

26542656
static void UpdateGainItems(void)
26552657
{
2658+
#if defined (HAVE_FLUIDSYNTH)
26562659
DisableItem(auto_gain, music_settings1, "fl_gain");
2660+
#endif
2661+
26572662
DisableItem(auto_gain, music_settings1, "opl_gain");
26582663
}
26592664

0 commit comments

Comments
 (0)