diff options
author | Max Horn | 2010-06-21 21:36:36 +0000 |
---|---|---|
committer | Max Horn | 2010-06-21 21:36:36 +0000 |
commit | bbad3f333a9227ccb1de633a0fe92d9e01ad7bb3 (patch) | |
tree | e5b53717ffc5972cec14be581f586228c245b858 /engines/kyra | |
parent | 49448af6cb2613460fe37caf79bdb1ed4c206715 (diff) | |
download | scummvm-rg350-bbad3f333a9227ccb1de633a0fe92d9e01ad7bb3.tar.gz scummvm-rg350-bbad3f333a9227ccb1de633a0fe92d9e01ad7bb3.tar.bz2 scummvm-rg350-bbad3f333a9227ccb1de633a0fe92d9e01ad7bb3.zip |
Patch #1956501: "GUI/LAUNCHER: Midi device selection"
svn-id: r50128
Diffstat (limited to 'engines/kyra')
-rw-r--r-- | engines/kyra/kyra_v1.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index 00b32425c2..970851c127 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -106,7 +106,7 @@ Common::Error KyraEngine_v1::init() { if (!_flags.useDigSound) { // We prefer AdLib over MIDI, since generally AdLib is better supported - MidiDriverType midiDriver = MidiDriver::detectMusicDriver(MDT_PCSPK | MDT_MIDI | MDT_ADLIB); + MidiDriver::DeviceHandle dev = MidiDriver::detectDevice(MDT_PCSPK | MDT_MIDI | MDT_ADLIB | MDT_PREFER_MIDI | MDT_PREFER_MT32); if (_flags.platform == Common::kPlatformFMTowns) { if (_flags.gameID == GI_KYRA1) @@ -120,24 +120,24 @@ Common::Error KyraEngine_v1::init() { _sound = new SoundTownsPC98_v2(this, _mixer); } else if (_flags.platform == Common::kPlatformAmiga) { _sound = new SoundAmiga(this, _mixer); - } else if (midiDriver == MD_ADLIB) { + } else if (MidiDriver::getMusicType(dev) == MT_ADLIB) { _sound = new SoundAdLibPC(this, _mixer); } else { Sound::kType type; - if (midiDriver == MD_PCSPK) + if (MidiDriver::getMusicType(dev) == MT_PCSPK) type = Sound::kPCSpkr; - else if (midiDriver == MD_MT32 || ConfMan.getBool("native_mt32")) + else if (MidiDriver::getMusicType(dev) == MT_MT32 || ConfMan.getBool("native_mt32")) type = Sound::kMidiMT32; else type = Sound::kMidiGM; MidiDriver *driver = 0; - if (midiDriver == MD_PCSPK) { + if (MidiDriver::getMusicType(dev) == MT_PCSPK) { driver = new MidiDriver_PCSpeaker(_mixer); } else { - driver = MidiDriver::createMidi(midiDriver); + driver = MidiDriver::createMidi(dev); if (type == Sound::kMidiMT32) driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE); } |