aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2013-11-03 19:14:29 +0100
committerJohannes Schickel2013-11-03 19:17:13 +0100
commit233512fe10670984dca3e05efe01c8309e055bd3 (patch)
tree5f88e311056ef870492cb3174fdc81efd8ae5308
parent919e577ba665002c1513b53a755cb1d663b99f7e (diff)
downloadscummvm-rg350-233512fe10670984dca3e05efe01c8309e055bd3.tar.gz
scummvm-rg350-233512fe10670984dca3e05efe01c8309e055bd3.tar.bz2
scummvm-rg350-233512fe10670984dca3e05efe01c8309e055bd3.zip
MADE: Create MusicPlayer in run() instead of MadeEngine's constructor.
This fixes MT-32 emulator initialization. When the constructor is run the paths like extrapath etc. are not yet set up. Thus, the MT-32 emulator would not be able to find the necessary roms in case they are in the extrapath.
-rw-r--r--engines/made/made.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/made/made.cpp b/engines/made/made.cpp
index 3843040961..3e192cb04c 100644
--- a/engines/made/made.cpp
+++ b/engines/made/made.cpp
@@ -85,7 +85,7 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng
_script = new ScriptInterpreter(this);
- _music = new MusicPlayer();
+ _music = nullptr;
// Set default sound frequency
switch (getGameID()) {
@@ -102,8 +102,6 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng
// Return to Zork sets it itself via a script funtion
break;
}
-
- syncSoundSettings();
}
MadeEngine::~MadeEngine() {
@@ -277,6 +275,8 @@ void MadeEngine::handleEvents() {
}
Common::Error MadeEngine::run() {
+ _music = new MusicPlayer();
+ syncSoundSettings();
// Initialize backend
initGraphics(320, 200, false);