diff options
author | pasky <pasky@openttd.org> | 2005-03-27 15:42:25 +0000 |
---|---|---|
committer | pasky <pasky@openttd.org> | 2005-03-27 15:42:25 +0000 |
commit | 04dc6441aad06c067fced48e132afc89c899c10e (patch) | |
tree | 025c800afe780843a500c7cc0b176d165425ea44 /extmidi.c | |
parent | 60bb2374d6fcb24eaec82eae2470e3e0d65c0213 (diff) | |
download | openttd-04dc6441aad06c067fced48e132afc89c899c10e.tar.xz |
(svn r2088) - Fix: [ 1155158 ] Make extmidi command a config option in addition to the compile-time MIDI switch. Patch by macbaine.
Diffstat (limited to 'extmidi.c')
-rw-r--r-- | extmidi.c | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -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); |