From 233512fe10670984dca3e05efe01c8309e055bd3 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 3 Nov 2013 19:14:29 +0100 Subject: 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. --- engines/made/made.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/made') 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); -- cgit v1.2.3