From 60fcd5a1713d143cd6fb4d0a9c6f3be030c65b5b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 30 Dec 2005 14:18:21 +0000 Subject: * Replaced MDT_PREFER_NATIVE/MDT_NATIVE by MDT_PREFER_MIDI/MDT_MIDI). * Changed MidiDriver::createMidi so that if MD_ADLIB is passed, it now *does* instantiate the adlib driver. * Rewrote MidiDriver::detectMusicDriver (code should be clearer now, and hopefully easier to adapt/maintain). Note that the behavior changed slightly (this may require some tweaking). * Added MidiDriver::findMusicDriver which works similar to the old MidiDriver::parseMusicDriver but returns the full MidiDriverDescription and ignores all characters in the passed driver name following a colon ":". * Changed MidiDriver::parseMusicDriver to use MidiDriver::findMusicDriver. * Changed game engines to match the changes made to MidiDriver. * Modified SCUMM engine to not record the selected midi/music driver (in _midiDriver), but rather the music *type* (in _musicType). svn-id: r19859 --- queen/queen.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'queen') diff --git a/queen/queen.cpp b/queen/queen.cpp index 11bb1df1ae..996b77bbd3 100644 --- a/queen/queen.cpp +++ b/queen/queen.cpp @@ -431,15 +431,15 @@ int QueenEngine::init(GameDetector &detector) { // Set mixer music volume to maximum, since music volume is regulated by MusicPlayer's MIDI messages _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, Audio::Mixer::kMaxMixerVolume); - int midiDriver = MidiDriver::detectMusicDriver(MDT_NATIVE | MDT_ADLIB | MDT_PREFER_NATIVE); + int midiDriver = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB | MDT_PREFER_MIDI); + bool native_mt32 = ((midiDriver == MD_MT32) || ConfMan.getBool("native_mt32")); + MidiDriver *driver = MidiDriver::createMidi(midiDriver); - if (!driver) - driver = MidiDriver_ADLIB_create(_mixer); - else if (ConfMan.getBool("native_mt32") || (midiDriver == MD_MT32)) + if (native_mt32) driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE); _music = new Music(driver, this); - _music->hasNativeMT32(ConfMan.getBool("native_mt32") || (midiDriver == MD_MT32)); + _music->hasNativeMT32(native_mt32); _sound = Sound::giveSound(_mixer, this, _resource->compression()); _walk = new Walk(this); -- cgit v1.2.3