diff -ur ScummVM-cvs20021113/scummvm/sound/mididrv.cpp ScummVM-cvs20021113+hack/scummvm/sound/mididrv.cpp
old
|
new
|
|
544 | 544 | if (_mode != 0) |
545 | 545 | return MERR_ALREADY_OPEN; |
546 | 546 | device = 0; |
547 | | _mode = mode; |
548 | 547 | if (mode != MO_SIMPLE) |
549 | 548 | return MERR_STREAMING_NOT_AVAILABLE; |
550 | 549 | |
| 550 | _mode = mode; |
| 551 | |
551 | 552 | char *device_name = getenv("SCUMMVM_MIDI"); |
552 | 553 | if (device_name != NULL) { |
553 | 554 | device = (::open((device_name), O_RDWR, 0)); |
… |
… |
|
1114 | 1115 | |
1115 | 1116 | if (_mode != 0) |
1116 | 1117 | return MERR_ALREADY_OPEN; |
1117 | | _mode = mode; |
1118 | 1118 | |
1119 | 1119 | if (mode != MO_SIMPLE) |
1120 | 1120 | return MERR_STREAMING_NOT_AVAILABLE; |
1121 | 1121 | |
| 1122 | _mode = mode; |
| 1123 | |
1122 | 1124 | if (!(var = getenv("SCUMMVM_PORT"))) { |
1123 | 1125 | // default alsa port if none specified |
1124 | 1126 | if (parse_addr("65:0", &seq_client, &seq_port) < 0) { |