diff options
author | Yotam Barnoy | 2010-11-18 11:31:46 +0000 |
---|---|---|
committer | Yotam Barnoy | 2010-11-18 11:31:46 +0000 |
commit | dde4f2211c058a109f5ee921ed3700c44cb83519 (patch) | |
tree | 2059e612149cd9865b00305dc87dcbdc0539f7ce | |
parent | 785dd683e1e3115726aa15b1693c80901ff79f8b (diff) | |
download | scummvm-rg350-dde4f2211c058a109f5ee921ed3700c44cb83519.tar.gz scummvm-rg350-dde4f2211c058a109f5ee921ed3700c44cb83519.tar.bz2 scummvm-rg350-dde4f2211c058a109f5ee921ed3700c44cb83519.zip |
MAIN: initialized more singletons early to prevent fragmentation.
svn-id: r54315
-rw-r--r-- | base/main.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/base/main.cpp b/base/main.cpp index 9a788b7e81..2958dea283 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -48,12 +48,14 @@ #include "common/system.h" #include "common/tokenizer.h" #include "common/translation.h" +#include "common/debug-channels.h" /* for debug manager */ #include "gui/gui-manager.h" #include "gui/message.h" #include "gui/error.h" #include "sound/mididrv.h" +#include "sound/musicplugin.h" /* for music manager */ #include "backends/keymapper/keymapper.h" @@ -372,9 +374,11 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) { setupGraphics(system); - // Init the audio cd manager. It won't be released, so to prevent fragmentation, - // we'll create it early on. + // Init the different managers that are used by the engines. + // Do it here to prevent fragmentation later system.getAudioCDManager(); + MusicManager::instance(); + Common::DebugManager::instance(); // Init the event manager. As the virtual keyboard is loaded here, it must // take place after the backend is initiated and the screen has been setup |