aboutsummaryrefslogtreecommitdiff
path: root/base/main.cpp
diff options
context:
space:
mode:
authorYotam Barnoy2010-11-18 11:31:46 +0000
committerYotam Barnoy2010-11-18 11:31:46 +0000
commitdde4f2211c058a109f5ee921ed3700c44cb83519 (patch)
tree2059e612149cd9865b00305dc87dcbdc0539f7ce /base/main.cpp
parent785dd683e1e3115726aa15b1693c80901ff79f8b (diff)
downloadscummvm-rg350-dde4f2211c058a109f5ee921ed3700c44cb83519.tar.gz
scummvm-rg350-dde4f2211c058a109f5ee921ed3700c44cb83519.tar.bz2
scummvm-rg350-dde4f2211c058a109f5ee921ed3700c44cb83519.zip
MAIN: initialized more singletons early to prevent fragmentation.
svn-id: r54315
Diffstat (limited to 'base/main.cpp')
-rw-r--r--base/main.cpp8
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