diff options
author | Jamieson Christian | 2003-10-05 15:36:52 +0000 |
---|---|---|
committer | Jamieson Christian | 2003-10-05 15:36:52 +0000 |
commit | a722d0601e4ae87b15fe09f62b3a1076c6c8646e (patch) | |
tree | 511293906e3b210764b047191d68278e4d8cf138 /base | |
parent | 7174a32c8e877627c51da50b657083873aeef1e6 (diff) | |
download | scummvm-rg350-a722d0601e4ae87b15fe09f62b3a1076c6c8646e.tar.gz scummvm-rg350-a722d0601e4ae87b15fe09f62b3a1076c6c8646e.tar.bz2 scummvm-rg350-a722d0601e4ae87b15fe09f62b3a1076c6c8646e.zip |
Preliminary preparation for new YM2612 FM emulator.
All the hooks are in, but actual implementation
needs to be checked for portability.
svn-id: r10615
Diffstat (limited to 'base')
-rw-r--r-- | base/gameDetector.cpp | 10 | ||||
-rw-r--r-- | base/gameDetector.h | 5 |
2 files changed, 11 insertions, 4 deletions
diff --git a/base/gameDetector.cpp b/base/gameDetector.cpp index d1c8bde1d1..7c73715da1 100644 --- a/base/gameDetector.cpp +++ b/base/gameDetector.cpp @@ -676,12 +676,15 @@ bool GameDetector::detectMain() { if (_game.midi & MDT_PREFER_NATIVE) _midi_driver = getMidiDriverType(); else - _midi_driver = MD_ADLIB; + _midi_driver = MD_TOWNS; } bool nativeMidiDriver = (_midi_driver != MD_NULL && _midi_driver != MD_ADLIB && - _midi_driver != MD_PCSPK && _midi_driver != MD_PCJR); + _midi_driver != MD_PCSPK && _midi_driver != MD_PCJR && + _midi_driver != MD_TOWNS); if (nativeMidiDriver && !(_game.midi & MDT_NATIVE)) + _midi_driver = MD_TOWNS; + if (_midi_driver == MD_TOWNS && !(_game.midi & MDT_TOWNS)) _midi_driver = MD_ADLIB; if (_midi_driver == MD_ADLIB && !(_game.midi & MDT_ADLIB)) _midi_driver = MD_PCJR; @@ -770,12 +773,15 @@ MidiDriver *GameDetector::createMidi() { switch(drv) { case MD_NULL: return MidiDriver_NULL_create(); + // In the case of Adlib, we won't specify anything. // IMuse is designed to set up its own Adlib driver // if need be, and we only have to specify a native // driver. case MD_ADLIB: return NULL; + case MD_TOWNS: return MidiDriver_YM2612_create(g_engine->_mixer); + // Right now PC Speaker and PCjr are handled // outside the MidiDriver architecture, so // don't create anything for now. diff --git a/base/gameDetector.h b/base/gameDetector.h index 038a7681c4..a78288e437 100644 --- a/base/gameDetector.h +++ b/base/gameDetector.h @@ -70,8 +70,9 @@ enum MidiDriverType { MDT_NONE = 0, MDT_PCSPK = 1, // MD_PCSPK and MD_PCJR MDT_ADLIB = 2, // MD_ADLIB - MDT_NATIVE = 4, // Everything else - MDT_PREFER_NATIVE = 8 + MDT_TOWNS = 4, // MD_TOWNS + MDT_NATIVE = 8, // Everything else + MDT_PREFER_NATIVE = 16 }; struct TargetSettings { |