[Scummvm-cvs-logs] CVS: scummvm/common main.cpp,1.37,1.38
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Tue Aug 19 18:15:03 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/bs2 anims.cpp,1.7,1.8 build_display.cpp,1.9,1.10 console.cpp,1.5,1.6 controls.cpp,1.6,1.7 debug.cpp,1.5,1.6 function.cpp,1.5,1.6 logic.cpp,1.4,1.5 mem_view.cpp,1.3,1.4 mouse.cpp,1.7,1.8 resman.cpp,1.11,1.12 router.cpp,1.6,1.7 startup.cpp,1.7,1.8 sword2.cpp,1.13,1.14
- Next message: [Scummvm-cvs-logs] CVS: residual lua.cpp,1.9,1.10 walkplane.cpp,1.1,1.2 walkplane.h,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv28022
Modified Files:
main.cpp
Log Message:
Fix compile.
Index: main.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/main.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- main.cpp 19 Aug 2003 15:03:27 -0000 1.37
+++ main.cpp 19 Aug 2003 16:10:05 -0000 1.38
@@ -200,39 +200,38 @@
launcherDialog(detector, system);
// Verify the given game name
- if (detector.detectMain())
- goto exitNow;
+ 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);
- // 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);
+ }
- // 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);
- // 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());
- // 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();
- // Run the game engine
- engine->go();
+ // Stop all sound processing now (this prevents some race conditions later on)
+ system->clear_sound_proc();
- // Stop all sound processing now (this prevents some race conditions later on)
- system->clear_sound_proc();
+ // Free up memory
+ delete engine;
+ }
- // Free up memory
- delete engine;
-exitNow:
delete g_gui;
delete g_config;
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/bs2 anims.cpp,1.7,1.8 build_display.cpp,1.9,1.10 console.cpp,1.5,1.6 controls.cpp,1.6,1.7 debug.cpp,1.5,1.6 function.cpp,1.5,1.6 logic.cpp,1.4,1.5 mem_view.cpp,1.3,1.4 mouse.cpp,1.7,1.8 resman.cpp,1.11,1.12 router.cpp,1.6,1.7 startup.cpp,1.7,1.8 sword2.cpp,1.13,1.14
- Next message: [Scummvm-cvs-logs] CVS: residual lua.cpp,1.9,1.10 walkplane.cpp,1.1,1.2 walkplane.h,1.1,1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list