diff options
author | Jamieson Christian | 2002-11-21 19:06:42 +0000 |
---|---|---|
committer | Jamieson Christian | 2002-11-21 19:06:42 +0000 |
commit | c9ed09e7df28be6517f3cce26298124a0102a10c (patch) | |
tree | 2bfd354f2cbb1fa07cec34101d61cf3693edd9d1 /common | |
parent | d7e443cd7c8c91b0e19f85abb94a63301bc17a2b (diff) | |
download | scummvm-rg350-c9ed09e7df28be6517f3cce26298124a0102a10c.tar.gz scummvm-rg350-c9ed09e7df28be6517f3cce26298124a0102a10c.tar.bz2 scummvm-rg350-c9ed09e7df28be6517f3cce26298124a0102a10c.zip |
Revamped Adlib functionality.
IMuseAdlib is defunct.
New MidiDriver_ADLIB device.
Simon 1/2 now supports Adlib.
svn-id: r5677
Diffstat (limited to 'common')
-rw-r--r-- | common/gameDetector.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp index 9e766674f2..9195ef2c67 100644 --- a/common/gameDetector.cpp +++ b/common/gameDetector.cpp @@ -408,7 +408,7 @@ bool GameDetector::parseMusicDriver(const char *s) { {"etude",MD_ETUDE}, {"midiemu",MD_MIDIEMU}, {"alsa", MD_ALSA}, - {"adlib",-1}, + {"adlib", MD_ADLIB}, }; const MusicDrivers *md = music_drivers; @@ -418,7 +418,7 @@ bool GameDetector::parseMusicDriver(const char *s) { for(i=0; i!=ARRAYSIZE(music_drivers); i++,md++) { if (!scumm_stricmp(md->name, s)) { - if (md->id == -1) { + if (md->id == MD_ADLIB) { _use_adlib = true; } _midi_driver = md->id; @@ -574,6 +574,7 @@ int GameDetector::detectMain() * and the game is one of those that want adlib as * default */ if (_midi_driver == MD_AUTO && _features & GF_ADLIB_DEFAULT) { + _midi_driver = MD_ADLIB; _use_adlib = true; } @@ -649,15 +650,19 @@ MidiDriver *GameDetector::createMidi() { /* FIXME: We should, for the Unix targets, attempt to detect */ /* whether a sequencer is available, and use it in */ /* preference */ +/* if (drv == MD_AUTO) { _use_adlib = true; return NULL; } +*/ + if (drv == MD_AUTO) drv = MD_ADLIB; #endif switch(drv) { case MD_AUTO: case MD_NULL: return MidiDriver_NULL_create(); + case MD_ADLIB: _use_adlib = true; return MidiDriver_ADLIB_create(); #if defined(WIN32) && !defined(_WIN32_WCE) case MD_WINDOWS: return MidiDriver_WIN_create(); #endif |