aboutsummaryrefslogtreecommitdiff
path: root/saga
diff options
context:
space:
mode:
authorMax Horn2005-12-30 14:18:21 +0000
committerMax Horn2005-12-30 14:18:21 +0000
commit60fcd5a1713d143cd6fb4d0a9c6f3be030c65b5b (patch)
tree6f72d5cd2ed9d83c2087130e5ca1e236b70aaa1c /saga
parent2b156bd4c1d334931513a834a757723ec290db0b (diff)
downloadscummvm-rg350-60fcd5a1713d143cd6fb4d0a9c6f3be030c65b5b.tar.gz
scummvm-rg350-60fcd5a1713d143cd6fb4d0a9c6f3be030c65b5b.tar.bz2
scummvm-rg350-60fcd5a1713d143cd6fb4d0a9c6f3be030c65b5b.zip
* 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
Diffstat (limited to 'saga')
-rw-r--r--saga/saga.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/saga/saga.cpp b/saga/saga.cpp
index 06a003604f..9783dc1592 100644
--- a/saga/saga.cpp
+++ b/saga/saga.cpp
@@ -232,16 +232,12 @@ int SagaEngine::init(GameDetector &detector) {
_console = new Console(this);
// Graphics should be initialized before music
- int midiDriver = MidiDriver::detectMusicDriver(MDT_NATIVE | MDT_ADLIB | MDT_PREFER_NATIVE);
- bool native_mt32 = (ConfMan.getBool("native_mt32") || (midiDriver == MD_MT32));
-
- bool adlib = false;
+ int midiDriver = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB | MDT_PREFER_MIDI);
+ bool native_mt32 = ((midiDriver == MD_MT32) || ConfMan.getBool("native_mt32"));
+ bool adlib = (midiDriver == MD_ADLIB);
MidiDriver *driver = MidiDriver::createMidi(midiDriver);
- if (!driver) {
- driver = MidiDriver_ADLIB_create(_mixer);
- adlib = true;
- } else if (native_mt32)
+ if (native_mt32)
driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE);
_music = new Music(this, _mixer, driver, _musicVolume);