Change: DOS music loading for non-Windows music drivers
This commit is contained in:

committed by
Michael Lutz

parent
458e441a4c
commit
a8080f14a9
@@ -18,6 +18,7 @@
|
||||
#include "../gfx_func.h"
|
||||
#include "extmidi.h"
|
||||
#include "../base_media_base.h"
|
||||
#include "midifile.hpp"
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
@@ -86,10 +87,11 @@ void MusicDriver_ExtMidi::Stop()
|
||||
|
||||
void MusicDriver_ExtMidi::PlaySong(const MusicSongInfo &song)
|
||||
{
|
||||
if (song.filetype != MTT_STANDARDMIDI) return;
|
||||
|
||||
strecpy(this->song, song.filename, lastof(this->song));
|
||||
this->DoStop();
|
||||
std::string filename = MidiFile::GetSMFFile(song);
|
||||
if (!filename.empty()) {
|
||||
strecpy(this->song, filename.c_str(), lastof(this->song));
|
||||
this->DoStop();
|
||||
}
|
||||
}
|
||||
|
||||
void MusicDriver_ExtMidi::StopSong()
|
||||
|
Reference in New Issue
Block a user