Ticket #8126: midifix.diff

File midifix.diff, 906 bytes (added by eriktorbjorn, 22 years ago)

Patch against a November 13 CVS snapshot

  • scummvm/sound/mididrv.cpp

    diff -ur ScummVM-cvs20021113/scummvm/sound/mididrv.cpp ScummVM-cvs20021113+hack/scummvm/sound/mididrv.cpp
    old new  
    544544        if (_mode != 0)
    545545                return MERR_ALREADY_OPEN;
    546546        device = 0;
    547         _mode = mode;
    548547        if (mode != MO_SIMPLE)
    549548                return MERR_STREAMING_NOT_AVAILABLE;
    550549
     550        _mode = mode;
     551
    551552        char *device_name = getenv("SCUMMVM_MIDI");
    552553        if (device_name != NULL) {
    553554                device = (::open((device_name), O_RDWR, 0));
     
    11141115
    11151116        if (_mode != 0)
    11161117                return MERR_ALREADY_OPEN;
    1117         _mode = mode;
    11181118
    11191119        if (mode != MO_SIMPLE)
    11201120                return MERR_STREAMING_NOT_AVAILABLE;
    11211121
     1122        _mode = mode;
     1123
    11221124        if (!(var = getenv("SCUMMVM_PORT"))) {
    11231125                // default alsa port if none specified
    11241126                if (parse_addr("65:0", &seq_client, &seq_port) < 0) {