summaryrefslogtreecommitdiff
path: root/src/music/win32_m.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/music/win32_m.cpp')
-rw-r--r--src/music/win32_m.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/music/win32_m.cpp b/src/music/win32_m.cpp
index 8e5adeab2..51528133b 100644
--- a/src/music/win32_m.cpp
+++ b/src/music/win32_m.cpp
@@ -307,12 +307,14 @@ void CALLBACK TimerCallback(UINT uTimerID, UINT, DWORD_PTR dwUser, DWORD_PTR, DW
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(song.filename);
+ if (!_midi.next_file.LoadSong(song)) {
+ LeaveCriticalSection(&_midi.lock);
+ return;
+ }
+
_midi.next_segment.start = 0;
_midi.next_segment.end = 0;
_midi.next_segment.loop = false;