From 57db6fd4578b8714cf52be899fa9ed6014514795 Mon Sep 17 00:00:00 2001 From: gameblabla Date: Sun, 11 Aug 2024 13:57:51 +0200 Subject: [PATCH] Fix compilation errors if FluidSynth/WildMidi/FMMidi are disabled --- src/audio_midi.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/audio_midi.cpp b/src/audio_midi.cpp index e4b027a3a6..6b94067d89 100644 --- a/src/audio_midi.cpp +++ b/src/audio_midi.cpp @@ -52,17 +52,23 @@ static struct { std::unique_ptr MidiDecoder::Create(bool resample) { std::unique_ptr mididec; +#if defined(HAVE_FLUIDSYNTH) || defined(HAVE_FLUIDLITE) if (Audio().GetFluidsynthEnabled()) { mididec = CreateFluidsynth(resample); } +#endif +#ifdef HAVE_LIBWILDMIDI if (!mididec && Audio().GetWildMidiEnabled()) { mididec = CreateWildMidi(resample); } +#endif +#if WANT_FMMIDI if (!mididec) { mididec = CreateFmMidi(resample); } +#endif return mididec; } @@ -176,4 +182,4 @@ void MidiDecoder::Reset() { #if defined(HAVE_FLUIDSYNTH) || defined(HAVE_FLUIDLITE) FluidSynthDecoder::ResetState(); #endif -} +} \ No newline at end of file