[Scummvm-cvs-logs] CVS: scummvm/base main.cpp,1.77,1.78
Max Horn
fingolfin at users.sourceforge.net
Thu May 5 05:04:41 CEST 2005
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm scumm.cpp,1.484,1.485
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.475,2.476 scumm.cpp,1.485,1.486 scumm.h,1.616,1.617 string.cpp,1.286,1.287
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/base
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4084/base
Modified Files:
main.cpp
Log Message:
Handle engine creation failure a bit more graceful
Index: main.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/main.cpp,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- main.cpp 24 Apr 2005 12:21:52 -0000 1.77
+++ main.cpp 5 May 2005 12:03:40 -0000 1.78
@@ -250,6 +250,17 @@
}
static int runGame(GameDetector &detector, OSystem &system) {
+ // Create the game engine
+ Engine *engine = detector.createEngine(&system);
+ if (!engine) {
+ // TODO: Show an error dialog or so?
+ //GUI::MessageDialog alert("ScummVM could not find any game in the specified directory!");
+ //alert.runModal();
+ warning("Failed to instantiate engine for target %s", detector._targetName.c_str());
+ return 0;
+ }
+
+
// Set the window caption to the game name
Common::String caption(ConfMan.get("description", detector._targetName));
@@ -261,10 +272,6 @@
system.setWindowCaption(caption.c_str());
}
- // Create the game engine
- Engine *engine = detector.createEngine(&system);
- assert(engine);
-
// Add extrapath (if any) to the directory search list
if (ConfMan.hasKey("extrapath"))
File::addDefaultDirectory(ConfMan.get("extrapath"));
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/scumm scumm.cpp,1.484,1.485
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm intern.h,2.475,2.476 scumm.cpp,1.485,1.486 scumm.h,1.616,1.617 string.cpp,1.286,1.287
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list