[Scummvm-cvs-logs] CVS: scummvm/common main.cpp,1.21,1.22

Jonathan Gray khalek at users.sourceforge.net
Thu Mar 6 16:53:15 CET 2003


Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv31364

Modified Files:
	main.cpp 
Log Message:
exit cleanly if invalid target is specified

Index: main.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/main.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- main.cpp	6 Mar 2003 21:45:24 -0000	1.21
+++ main.cpp	7 Mar 2003 00:52:45 -0000	1.22
@@ -200,6 +200,11 @@
 	// 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();
 





More information about the Scummvm-git-logs mailing list