aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraziel-2014-02-23 17:33:24 +0200
committerD G Turner2014-03-22 01:13:45 +0000
commit22634d18ba5a4d831878df7b29f715a9318994e0 (patch)
tree4e957011d90f050b6069a28bb4e61736b205367d
parentb7f8c11274ffafda63e5680ff489796e1cc86912 (diff)
downloadscummvm-rg350-22634d18ba5a4d831878df7b29f715a9318994e0.tar.gz
scummvm-rg350-22634d18ba5a4d831878df7b29f715a9318994e0.tar.bz2
scummvm-rg350-22634d18ba5a4d831878df7b29f715a9318994e0.zip
AMIGAOS: Update CAMD midi to use output port environment variable.
If this is not present, it will use the default as previously.
-rw-r--r--backends/midi/camd.cpp9
1 files changed, 8 insertions, 1 deletions
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 <proto/camd.h>
#include <proto/exec.h>
+#include <proto/dos.h>
/*
* 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);
}