From 560b01f3071664357c2608c031bb8a4f86caaf26 Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Mon, 3 Sep 2018 18:35:22 +0200 Subject: Fix: Check the search paths for standard MIDI files --- src/music/midifile.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/music') diff --git a/src/music/midifile.cpp b/src/music/midifile.cpp index 688538db9..9506776ef 100644 --- a/src/music/midifile.cpp +++ b/src/music/midifile.cpp @@ -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(); -- cgit v1.2.3-70-g09d2