(svn r2088) - Fix: [ 1155158 ] Make extmidi command a config option in addition to the compile-time MIDI switch. Patch by macbaine.

This commit is contained in:
pasky
2005-03-27 15:42:25 +00:00
parent 60bb2374d6
commit 04dc6441aa
4 changed files with 11 additions and 7 deletions

View File

@@ -4,6 +4,7 @@
#include "ttd.h"
#include "hal.h"
#include "sound.h"
#include <sys/types.h>
#include <sys/wait.h>
#include <unistd.h>
@@ -11,10 +12,6 @@
#include <sys/stat.h>
#include <errno.h>
#ifndef EXTERNAL_PLAYER
#define EXTERNAL_PLAYER "timidity"
#endif
static pid_t _pid;
static void extmidi_kill(void)
@@ -50,9 +47,9 @@ static void extmidi_play_song(const char *filename)
if (_pid == 0) {
#if defined(MIDI_ARG)
execlp(EXTERNAL_PLAYER, "extmidi", MIDI_ARG, filename, NULL);
execlp(msf.extmidi, "extmidi", MIDI_ARG, filename, NULL);
#else
execlp(EXTERNAL_PLAYER, "extmidi", filename, NULL);
execlp(msf.extmidi, "extmidi", filename, NULL);
#endif
fprintf(stderr, "extmidi: couldn't execl: %s\n", strerror(errno));
exit(0);