diff --git a/Source/i_flmusic.c b/Source/i_flmusic.c index a601f937..9604d0ac 100644 --- a/Source/i_flmusic.c +++ b/Source/i_flmusic.c @@ -23,6 +23,7 @@ #include "doomtype.h" #include "i_system.h" #include "i_sound.h" +#include "m_misc2.h" #include "memio.h" #include "mus2mid.h" @@ -77,9 +78,14 @@ static boolean I_FL_InitMusic(void) if (sf_id == FLUID_FAILED) { + char *errmsg; delete_fluid_synth(synth); delete_fluid_settings(settings); - I_Error("Error loading FluidSynth soundfont: %s\n", soundfont_path); + errmsg = M_StringJoin("Error loading FluidSynth soundfont: ", + soundfont_path, NULL); + SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_WARNING, + PROJECT_STRING, errmsg, NULL); + (free)(errmsg); return false; } diff --git a/Source/i_sound.c b/Source/i_sound.c index d6ef89ae..9da162ba 100644 --- a/Source/i_sound.c +++ b/Source/i_sound.c @@ -760,8 +760,17 @@ void I_InitSound(void) if (midi_player_module) { active_module = midi_player_module; - active_module->I_InitMusic(); - I_AtExit(active_module->I_ShutdownMusic, true); + if (active_module->I_InitMusic()) + { + I_AtExit(active_module->I_ShutdownMusic, true); + } + else + { + // fall back to Native/SDL on error + midi_player = 0; + midi_player_module = NULL; + active_module = &music_sdl_module; + } } } }