- refactored the GUS/Timidity player's path building code so that it can also be used by WildMidi.

- fixed crash during sound reset - in this case I_ShutdownMusic should not close the WildMidi player.
This commit is contained in:
Christoph Oelckers 2015-12-29 20:38:08 +01:00
commit fe2dcfd588
11 changed files with 198 additions and 121 deletions

View file

@ -159,12 +159,12 @@ static Instrument *load_instrument(Renderer *song, const char *name, int percuss
if (!name) return 0;
/* Open patch file */
if ((fp = open_filereader(name, openmode, NULL)) == NULL)
if ((fp = pathExpander.openFileReader(name, NULL)) == NULL)
{
/* Try with various extensions */
FString tmp = name;
tmp += ".pat";
if ((fp = open_filereader(tmp, openmode, NULL)) == NULL)
if ((fp = pathExpander.openFileReader(tmp, NULL)) == NULL)
{
#ifdef __unix__ // Windows isn't case-sensitive.
tmp.ToUpper();