diff options
author | Niels Martin Hansen <nielsm@indvikleren.dk> | 2018-03-17 14:51:30 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2018-06-05 22:58:35 +0200 |
commit | f946b3da56b22c1fc32a9ffc9008374e4fb4f8c8 (patch) | |
tree | 3d8b2b0cf0e3931d2e38cce4b822f5b082d0cb92 /src/music/win32_m.cpp | |
parent | 1c2d29e1a3b5afdf3933f4cc743dda35c3ebb5fb (diff) | |
download | openttd-f946b3da56b22c1fc32a9ffc9008374e4fb4f8c8.tar.xz |
Codechange: Pass a MusicSongInfo struct instead of bare filename to music drivers.
Preparation for later extending the info passed to music drivers.
Diffstat (limited to 'src/music/win32_m.cpp')
-rw-r--r-- | src/music/win32_m.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/music/win32_m.cpp b/src/music/win32_m.cpp index edaae36fa..8e5adeab2 100644 --- a/src/music/win32_m.cpp +++ b/src/music/win32_m.cpp @@ -18,6 +18,7 @@ #include "../debug.h" #include "midifile.hpp" #include "midi.h" +#include "../base_media_base.h" #include "../safeguards.h" @@ -304,12 +305,14 @@ void CALLBACK TimerCallback(UINT uTimerID, UINT, DWORD_PTR dwUser, DWORD_PTR, DW } } -void MusicDriver_Win32::PlaySong(const char *filename) +void MusicDriver_Win32::PlaySong(const MusicSongInfo &song) { + if (song.filetype != MTT_STANDARDMIDI) return; + DEBUG(driver, 2, "Win32-MIDI: PlaySong: entry"); EnterCriticalSection(&_midi.lock); - _midi.next_file.LoadFile(filename); + _midi.next_file.LoadFile(song.filename); _midi.next_segment.start = 0; _midi.next_segment.end = 0; _midi.next_segment.loop = false; |