Add missing FluidSynth checks, consistency tweak (#2109)

* Add missing FluidSynth check

* Fix check inconsistency

* Add more missing checks
This commit is contained in:
Alaux 2024-12-31 05:09:07 -03:00 committed by GitHub
parent f2fa2bc44c
commit 4e3779359f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 2 deletions

View File

@ -439,7 +439,11 @@ static boolean I_OAL_InitMusic(int device)
return false;
}
static int fl_gain, opl_gain;
#if defined(HAVE_FLUIDSYNTH)
static int fl_gain;
#endif
static int opl_gain;
static void I_OAL_SetMusicVolume(int volume)
{
@ -609,7 +613,7 @@ static const char **I_OAL_DeviceList(void)
static midiplayertype_t I_OAL_MidiPlayerType(void)
{
#ifdef HAVE_FLUIDSYNTH
#if defined (HAVE_FLUIDSYNTH)
if (active_module == &stream_fl_module)
{
return midiplayer_fluidsynth;

View File

@ -2492,6 +2492,7 @@ static void SetMidiPlayerOpl(void)
}
}
#if defined(HAVE_FLUIDSYNTH)
static void SetMidiPlayerFluidSynth(void)
{
if (I_MidiPlayerType() == midiplayer_fluidsynth)
@ -2499,6 +2500,7 @@ static void SetMidiPlayerFluidSynth(void)
SetMidiPlayer();
}
}
#endif
static void RestartMusic(void)
{
@ -2653,7 +2655,10 @@ static setup_menu_t music_settings1[] = {
static void UpdateGainItems(void)
{
#if defined (HAVE_FLUIDSYNTH)
DisableItem(auto_gain, music_settings1, "fl_gain");
#endif
DisableItem(auto_gain, music_settings1, "opl_gain");
}