[Scummvm-cvs-logs] SF.net SVN: scummvm:[54315] scummvm/trunk/base/main.cpp

Bluddy at users.sourceforge.net Bluddy at users.sourceforge.net
Thu Nov 18 12:31:47 CET 2010


Revision: 54315
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54315&view=rev
Author:   Bluddy
Date:     2010-11-18 11:31:46 +0000 (Thu, 18 Nov 2010)

Log Message:
-----------
MAIN: initialized more singletons early to prevent fragmentation.

Modified Paths:
--------------
    scummvm/trunk/base/main.cpp

Modified: scummvm/trunk/base/main.cpp
===================================================================
--- scummvm/trunk/base/main.cpp	2010-11-18 10:15:33 UTC (rev 54314)
+++ scummvm/trunk/base/main.cpp	2010-11-18 11:31:46 UTC (rev 54315)
@@ -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 @@
 
 	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


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list