MM: MM1: Fix crash on startup

This commit is contained in:
Paul Gilbert 2024-05-01 21:55:43 -07:00
parent 42e9dde7d1
commit 9bf01106fd
2 changed files with 7 additions and 6 deletions

View File

@ -62,10 +62,6 @@ Common::Error MM1Engine::run() {
// Initialize graphics mode
initGraphics(320, 200);
// Setup mixer
_sound = new Sound(_mixer);
syncSoundSettings();
if (isEnhanced()) {
if (!setupEnhanced())
return Common::kNoError;
@ -73,6 +69,10 @@ Common::Error MM1Engine::run() {
setupNormal();
}
// Setup mixer
_sound = new Sound(_mixer);
syncSoundSettings();
// Setup console
setDebugger(new Console());
if (gDebugLevel > 0)

View File

@ -50,8 +50,9 @@ _musicVolume(0), _sfxVolume(0) {
break;
}
// force load effects early so custom instruments for mt32 are loaded before sound is played.
loadEffectsData();
if (g_engine->getGameID() != GType_MightAndMagic1)
// Force load effects early so custom instruments for mt32 are loaded before sound is played.
loadEffectsData();
assert(_SoundDriver);