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
This commit is contained in:
parent
84ed3e272d
commit
17bf7b95aa
10 changed files with 17 additions and 27 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue