From 22634d18ba5a4d831878df7b29f715a9318994e0 Mon Sep 17 00:00:00 2001 From: raziel- Date: Sun, 23 Feb 2014 17:33:24 +0200 Subject: AMIGAOS: Update CAMD midi to use output port environment variable. If this is not present, it will use the default as previously. --- backends/midi/camd.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/backends/midi/camd.cpp b/backends/midi/camd.cpp index 2c5728990c..9cee2a84a6 100644 --- a/backends/midi/camd.cpp +++ b/backends/midi/camd.cpp @@ -36,6 +36,7 @@ #include #include +#include /* * CAMD sequencer driver @@ -56,6 +57,7 @@ private: struct Library *_CamdBase; struct CamdIFace *_ICamd; struct MidiLink *_midi_link; + char _outport[128]; char *getDevice(); void closeAll(); @@ -155,13 +157,18 @@ char *MidiDriver_CAMD::getDevice() { if (strstr(dev, "out") != NULL) { // This is an output device, return this - retname = dev; + strcpy(_outport, dev); + retname = _outport; } else { // Search the next one cluster = _ICamd->NextCluster(cluster); } } + // If the user has a preference outport set, use this instead + if(IDOS->GetVar("DefMidiOut", _outport, 128, 0)) + retname = _outport; + _ICamd->UnlockCAMD(key); } -- cgit v1.2.3