diff options
Diffstat (limited to 'src/music/qtmidi.cpp')
-rw-r--r-- | src/music/qtmidi.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/music/qtmidi.cpp b/src/music/qtmidi.cpp index 9bc6a6174..4cd01691d 100644 --- a/src/music/qtmidi.cpp +++ b/src/music/qtmidi.cpp @@ -31,6 +31,7 @@ #include "../stdafx.h" #include "qtmidi.h" #include "../debug.h" +#include "../base_media_base.h" #define Rect OTTDRect #define Point OTTDPoint @@ -258,8 +259,9 @@ void MusicDriver_QtMidi::Stop() * * @param filename Path to a MIDI file. */ -void MusicDriver_QtMidi::PlaySong(const char *filename) +void MusicDriver_QtMidi::PlaySong(const MusicSongInfo &song) { + if (song.filetype != MTT_STANDARDMIDI) return; if (!_quicktime_started) return; DEBUG(driver, 2, "qtmidi: trying to play '%s'", filename); @@ -276,7 +278,7 @@ void MusicDriver_QtMidi::PlaySong(const char *filename) FALLTHROUGH; case QT_STATE_IDLE: - LoadMovieForMIDIFile(filename, &_quicktime_movie); + LoadMovieForMIDIFile(song.filename, &_quicktime_movie); SetMovieVolume(_quicktime_movie, VOLUME); StartMovie(_quicktime_movie); _quicktime_state = QT_STATE_PLAY; |