aboutsummaryrefslogtreecommitdiff
path: root/sound/mididrv.cpp
diff options
context:
space:
mode:
authorJonathan Gray2002-11-16 01:16:53 +0000
committerJonathan Gray2002-11-16 01:16:53 +0000
commitcec1a5a2cd33121c6ace00a2d068d37628ba852e (patch)
tree92a620ffa72d907967f8f5aa923c028458663c0a /sound/mididrv.cpp
parent0f6cdd9a2b68b8cb8d5590f8a9490eaadc251487 (diff)
downloadscummvm-rg350-cec1a5a2cd33121c6ace00a2d068d37628ba852e.tar.gz
scummvm-rg350-cec1a5a2cd33121c6ace00a2d068d37628ba852e.tar.bz2
scummvm-rg350-cec1a5a2cd33121c6ace00a2d068d37628ba852e.zip
patch 638246 Fix for ALSA and SEQ MIDI drivers with simon, by jamieson
svn-id: r5579
Diffstat (limited to 'sound/mididrv.cpp')
-rw-r--r--sound/mididrv.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp
index 53bc58e265..ba8fcaea9a 100644
--- a/sound/mididrv.cpp
+++ b/sound/mididrv.cpp
@@ -544,10 +544,11 @@ int MidiDriver_SEQ::open(int mode)
if (_mode != 0)
return MERR_ALREADY_OPEN;
device = 0;
- _mode = mode;
if (mode != MO_SIMPLE)
return MERR_STREAMING_NOT_AVAILABLE;
+ _mode = mode;
+
char *device_name = getenv("SCUMMVM_MIDI");
if (device_name != NULL) {
device = (::open((device_name), O_RDWR, 0));
@@ -1114,11 +1115,12 @@ int MidiDriver_ALSA::open(int mode)
if (_mode != 0)
return MERR_ALREADY_OPEN;
- _mode = mode;
if (mode != MO_SIMPLE)
return MERR_STREAMING_NOT_AVAILABLE;
+ _mode = mode;
+
if (!(var = getenv("SCUMMVM_PORT"))) {
// default alsa port if none specified
if (parse_addr("65:0", &seq_client, &seq_port) < 0) {