From 6455c819896d58782f9ec195e0b716a1df32c296 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 8 Sep 2003 17:13:40 +0000 Subject: more plugin related work svn-id: r10098 --- common/main.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'common/main.cpp') diff --git a/common/main.cpp b/common/main.cpp index 8f67fc3300..2ef2d76a4f 100644 --- a/common/main.cpp +++ b/common/main.cpp @@ -32,13 +32,14 @@ #include "common/config-file.h" #include "common/engine.h" #include "common/gameDetector.h" +#include "common/plugins.h" #include "common/scaler.h" // For GFX_NORMAL #include "gui/newgui.h" #include "gui/launcher.h" #include "gui/message.h" -Config *g_config = 0; -NewGui *g_gui = 0; +Config *g_config = 0; +NewGui *g_gui = 0; #if defined(QTOPIA) // FIXME - why exactly is this needed? @@ -151,7 +152,6 @@ static void launcherDialog(GameDetector &detector, OSystem *system) { } int main(int argc, char *argv[]) { - GameDetector detector; OSystem::Property prop; #if defined(UNIX) @@ -179,8 +179,13 @@ int main(int argc, char *argv[]) { // Read the config file g_config = new Config(scummhome, "scummvm"); g_config->set("versioninfo", gScummVMVersion); + + // Load the plugins + g_pluginManager = new PluginManager(); + g_pluginManager->loadPlugins(); // Parse the command line information + GameDetector detector; detector._saveconfig = false; detector.updateconfig(); detector.parseCommandLine(argc, argv); @@ -215,7 +220,7 @@ int main(int argc, char *argv[]) { } // Create the game engine - Engine *engine = Engine::createFromDetector(&detector, system); + Engine *engine = detector.createEngine(system); // print a message if gameid is invalid if (engine == NULL) -- cgit v1.2.3