aboutsummaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorMax Horn2006-04-02 14:16:31 +0000
committerMax Horn2006-04-02 14:16:31 +0000
commit9217472f0e4e801659c0a448dcbf57c28fd36ee2 (patch)
treeb880dfbd4a18f93f78931749004c3a4e128f2f59 /base
parent72f4a1c76cb8aedf6f953e57090134320d7291b8 (diff)
downloadscummvm-rg350-9217472f0e4e801659c0a448dcbf57c28fd36ee2.tar.gz
scummvm-rg350-9217472f0e4e801659c0a448dcbf57c28fd36ee2.tar.bz2
scummvm-rg350-9217472f0e4e801659c0a448dcbf57c28fd36ee2.zip
With this change, backends are now responsible for instantiating their OSystem class before calling scummvm_main (Note: PalmOS and Symbian are not yet converted, and won't work currently)
svn-id: r21557
Diffstat (limited to 'base')
-rw-r--r--base/main.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/base/main.cpp b/base/main.cpp
index 0a4a7b670c..4baa6a6ca4 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -275,6 +275,11 @@ extern "C" int scummvm_main(int argc, char *argv[]) {
char *s=NULL;//argv[1]; SumthinWicked says: cannot assume that argv!=NULL here! eg. Symbian's CEBasicAppUI::SDLStartL() calls as main(0,NULL), if you want to change plz #ifdef __SYMBIAN32__
bool running = true;
+ // Verify that the backend has been initialised (i.e. g_system has been set).
+ assert(g_system);
+ OSystem &system = *g_system;
+
+
// Quick preparse of command-line, looking for alt configfile path
for (int i = argc - 1; i >= 1; i--) {
s = argv[i];
@@ -342,10 +347,6 @@ extern "C" int scummvm_main(int argc, char *argv[]) {
GUI::Actions::init(detector);
#endif
- // Ensure the system object exists (it may have already been created
- // at an earlier point, though!)
- OSystem &system = OSystem::instance();
-
detector.parseCommandLine(argc, argv);
#ifdef PALMOS_68K