aboutsummaryrefslogtreecommitdiff
path: root/base/main.cpp
diff options
context:
space:
mode:
authorMax Horn2003-09-28 21:08:48 +0000
committerMax Horn2003-09-28 21:08:48 +0000
commit17bf7b95aa8fb28dcacbe01a5ff547032ffbea1d (patch)
treed45dcf601b6e3ef0983210144d869821a435c9c3 /base/main.cpp
parent84ed3e272d7a470fac35e446ad9adbbd2c374f82 (diff)
downloadscummvm-rg350-17bf7b95aa8fb28dcacbe01a5ff547032ffbea1d.tar.gz
scummvm-rg350-17bf7b95aa8fb28dcacbe01a5ff547032ffbea1d.tar.bz2
scummvm-rg350-17bf7b95aa8fb28dcacbe01a5ff547032ffbea1d.zip
removed duplicate g_timer object (one was global, one was static to timer.cpp); set g_system earlier (might prevent a few race conditions)
svn-id: r10471
Diffstat (limited to 'base/main.cpp')
-rw-r--r--base/main.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/base/main.cpp b/base/main.cpp
index 643e47dcdb..b47b9e4b17 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -85,7 +85,7 @@ const char *gScummVMFullVersion = "ScummVM 0.5.3cvs (" __DATE__ " " __TIME__ ")"
Config *g_config = 0;
NewGui *g_gui = 0;
-Timer *g_timer = 0;
+OSystem *g_system = 0;
#if defined(WIN32) && defined(NO_CONSOLE)
#include <cstdio>
@@ -197,10 +197,6 @@ static void launcherDialog(GameDetector &detector, OSystem *system) {
system->set_palette(dummy_palette, 0, 16);
- // FIXME - hack we use because LauncherDialog accesses g_system
- extern OSystem *g_system;
- g_system = system;
-
LauncherDialog dlg(g_gui, detector);
dlg.runModal();
}
@@ -281,6 +277,7 @@ int main(int argc, char *argv[]) {
// Create the system object
OSystem *system = detector.createSystem();
+ g_system = system;
// Set initial window caption
prop.caption = "ScummVM";
@@ -309,7 +306,7 @@ int main(int argc, char *argv[]) {
}
// Create the timer services
- g_timer = new Timer (system);
+ g_timer = new Timer(system);
// Create the game engine
Engine *engine = detector.createEngine(system);