diff options
author | Walter van Niftrik | 2010-02-02 03:23:48 +0000 |
---|---|---|
committer | Walter van Niftrik | 2010-02-02 03:23:48 +0000 |
commit | 34939584234235cc1a084e4c6fbb13f2de47bc83 (patch) | |
tree | 16a558794744dfd6ccab20272810ac301d5be503 /engines/sci | |
parent | 5f7c5185427520547b28bce29642aa89ac8ce361 (diff) | |
download | scummvm-rg350-34939584234235cc1a084e4c6fbb13f2de47bc83.tar.gz scummvm-rg350-34939584234235cc1a084e4c6fbb13f2de47bc83.tar.bz2 scummvm-rg350-34939584234235cc1a084e4c6fbb13f2de47bc83.zip |
SCI: Abort when sound driver fails to open.
svn-id: r47807
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/sound/music.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index 7b8d5a0882..d81f2c8056 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -84,12 +84,13 @@ void SciMusic::init() { _pMidiDrv = MidiPlayer_Midi_create(_soundVersion); } - if (_pMidiDrv) { - _pMidiDrv->open(); + if (_pMidiDrv && !_pMidiDrv->open()) { _pMidiDrv->setTimerCallback(this, &miditimerCallback); _dwTempo = _pMidiDrv->getBaseTempo(); - } else - warning("Can't initialise music driver"); + } else { + error("Failed to initialize sound driver"); + } + _bMultiMidi = ConfMan.getBool("multi_midi"); } |