Added explicit fallback to default soundfont

With no soundfonts found the game crashed on startup
Local UNIX build had the same issue because $PROGDIR/soundfonts is not in search path
This commit is contained in:
alexey.lysiuk 2018-03-03 15:17:30 +02:00
parent 2541bd93fc
commit 8145b52037
3 changed files with 6 additions and 5 deletions

View File

@ -372,6 +372,11 @@ void FSoundFontManager::CollectSoundfonts()
}
}
}
if (soundfonts.Size() == 0)
{
ProcessOneFile(NicePath("$PROGDIR/soundfonts/gzdoom.sf2"));
}
}
//==========================================================================

View File

@ -324,10 +324,7 @@ FluidSynthMIDIDevice::FluidSynthMIDIDevice(const char *args)
{
return;
}
if (LoadPatchSets(nullptr))
{
return;
}
// The following will only be used if no soundfont at all is provided, i.e. even the standard one coming with GZDoom is missing.
#ifdef __unix__
// This is the standard location on Ubuntu.

View File

@ -97,7 +97,6 @@ const char *GetVersionString();
#define GAMESIG "GZDOOM"
#define BASEWAD "gzdoom.pk3"
#define OPTIONALWAD "zd_extra.pk3"
#define BASESF "gzdoom.sf2"
// More stuff that needs to be different for derivatives.
#define GAMENAME "GZDoom"