Codechange: Pass a MusicSongInfo struct instead of bare filename to music drivers.

Preparation for later extending the info passed to music drivers.
This commit is contained in:
Niels Martin Hansen
2018-03-17 14:51:30 +01:00
committed by Michael Lutz
parent 1c2d29e1a3
commit f946b3da56
23 changed files with 85 additions and 41 deletions

View File

@@ -17,6 +17,7 @@
#include "../video/video_driver.hpp"
#include "../gfx_func.h"
#include "extmidi.h"
#include "../base_media_base.h"
#include <fcntl.h>
#include <sys/types.h>
#include <sys/wait.h>
@@ -83,9 +84,11 @@ void MusicDriver_ExtMidi::Stop()
this->DoStop();
}
void MusicDriver_ExtMidi::PlaySong(const char *filename)
void MusicDriver_ExtMidi::PlaySong(const MusicSongInfo &song)
{
strecpy(this->song, filename, lastof(this->song));
if (song.filetype != MTT_STANDARDMIDI) return;
strecpy(this->song, song.filename, lastof(this->song));
this->DoStop();
}