mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-12 01:24:54 +00:00
Fix: Check the search paths for standard MIDI files
This commit is contained in:
parent
4b0b4e0643
commit
560b01f307
@ -1010,7 +1010,12 @@ bool MidiFile::WriteSMF(const char *filename)
|
|||||||
std::string MidiFile::GetSMFFile(const MusicSongInfo &song)
|
std::string MidiFile::GetSMFFile(const MusicSongInfo &song)
|
||||||
{
|
{
|
||||||
if (song.filetype == MTT_STANDARDMIDI) {
|
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();
|
if (song.filetype != MTT_MPSMIDI) return std::string();
|
||||||
|
Loading…
Reference in New Issue
Block a user