From 33f2fbff08573634e868c50d5cff3e4d2482a543 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 18 Oct 2003 00:22:46 +0000 Subject: We proudly present the latest installment of our hit series 'Untangle the mess': 'Help! Space Invaders refactored the music detector'... in other news, I obviously need to sleep now svn-id: r10883 --- sky/sky.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sky') diff --git a/sky/sky.cpp b/sky/sky.cpp index ddec59eaa0..360ec6fd46 100644 --- a/sky/sky.cpp +++ b/sky/sky.cpp @@ -265,15 +265,16 @@ void SkyEngine::initialise(void) { _systemVars.gameVersion = _skyDisk->determineGameVersion(); - if (_detector->getMidiDriverType() == MD_ADLIB) { + int midiDriver = GameDetector::detectMusicDriver(_detector->_game.midi); + if (midiDriver == MD_ADLIB) { _systemVars.systemFlags |= SF_SBLASTER; _skyMusic = new SkyAdlibMusic(_mixer, _skyDisk, _system); } else { _systemVars.systemFlags |= SF_ROLAND; if (ConfMan.getBool("native_mt32")) - _skyMusic = new SkyMT32Music(_detector->createMidi(), _skyDisk, _system); + _skyMusic = new SkyMT32Music(_detector->createMidi(midiDriver), _skyDisk, _system); else - _skyMusic = new SkyGmMusic(_detector->createMidi(), _skyDisk, _system); + _skyMusic = new SkyGmMusic(_detector->createMidi(midiDriver), _skyDisk, _system); } if (isCDVersion()) { -- cgit v1.2.3