Fix: Check the search paths for standard MIDI files

This commit is contained in:
Niels Martin Hansen 2018-09-03 18:35:22 +02:00
parent 4b0b4e0643
commit 560b01f307
1 changed files with 6 additions and 1 deletions

View File

@ -1010,7 +1010,12 @@ bool MidiFile::WriteSMF(const char *filename)
std::string MidiFile::GetSMFFile(const MusicSongInfo &song)
{
if (song.filetype == MTT_STANDARDMIDI) {
return std::string(song.filename);
char filename[MAX_PATH];
if (FioFindFullPath(filename, lastof(filename), Subdirectory::BASESET_DIR, song.filename)) {
return std::string(filename);
} else {
return std::string();
}
}
if (song.filetype != MTT_MPSMIDI) return std::string();