diff options
author | Torbjörn Andersson | 2003-08-19 16:10:05 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2003-08-19 16:10:05 +0000 |
commit | f5cdcfa3db1056c5bf79c94e8528bc07dedfea18 (patch) | |
tree | f49ffbb3b5a3aa01a840aac0a124992a08ffa126 /common | |
parent | a6d7d1521e8135d1e8ef45b4a630ee9219b4ad74 (diff) | |
download | scummvm-rg350-f5cdcfa3db1056c5bf79c94e8528bc07dedfea18.tar.gz scummvm-rg350-f5cdcfa3db1056c5bf79c94e8528bc07dedfea18.tar.bz2 scummvm-rg350-f5cdcfa3db1056c5bf79c94e8528bc07dedfea18.zip |
Fix compile.
svn-id: r9784
Diffstat (limited to 'common')
-rw-r--r-- | common/main.cpp | 61 |
1 files changed, 30 insertions, 31 deletions
diff --git a/common/main.cpp b/common/main.cpp index 725c544e60..2941f2cf79 100644 --- a/common/main.cpp +++ b/common/main.cpp @@ -200,39 +200,38 @@ int main(int argc, char *argv[]) { launcherDialog(detector, system); // Verify the given game name - if (detector.detectMain()) - goto exitNow; - - // Set the window caption to the game name - prop.caption = g_config->get("description", detector._gameFileName); - if (prop.caption == NULL) - prop.caption = detector.getGameName().c_str(); - system->property(OSystem::PROP_SET_WINDOW_CAPTION, &prop); - - // See if the game should default to 1x scaler - if ((detector._default_gfx_mode) && - (detector._game.features & GF_DEFAULT_TO_1X_SCALER)) { - prop.gfx_mode = GFX_NORMAL; - system->property(OSystem::PROP_SET_GFX_MODE, &prop); + if (!detector.detectMain()) { + // Set the window caption to the game name + prop.caption = g_config->get("description", detector._gameFileName); + if (prop.caption == NULL) + prop.caption = detector.getGameName().c_str(); + system->property(OSystem::PROP_SET_WINDOW_CAPTION, &prop); + + // See if the game should default to 1x scaler + if ((detector._default_gfx_mode) && + (detector._game.features & GF_DEFAULT_TO_1X_SCALER)) { + prop.gfx_mode = GFX_NORMAL; + system->property(OSystem::PROP_SET_GFX_MODE, &prop); + } + + // Create the game engine + Engine *engine = Engine::createFromDetector(&detector, system); + + // print a message if gameid is invalid + if (engine == NULL) + error("%s is an invalid target. Use the -z parameter to list targets\n", + detector._gameFileName.c_str()); + + // Run the game engine + engine->go(); + + // Stop all sound processing now (this prevents some race conditions later on) + system->clear_sound_proc(); + + // Free up memory + delete engine; } - // Create the game engine - Engine *engine = Engine::createFromDetector(&detector, system); - - // print a message if gameid is invalid - if (engine == NULL) - error("%s is an invalid target. Use the -z parameter to list targets\n", - detector._gameFileName.c_str()); - - // Run the game engine - engine->go(); - - // Stop all sound processing now (this prevents some race conditions later on) - system->clear_sound_proc(); - - // Free up memory - delete engine; -exitNow: delete g_gui; delete g_config; |