[Scummvm-cvs-logs] CVS: scummvm/base gameDetector.cpp,1.20,1.21
Max Horn
fingolfin at users.sourceforge.net
Fri Oct 10 07:13:09 CEST 2003
Update of /cvsroot/scummvm/scummvm/base
In directory sc8-pr-cvs1:/tmp/cvs-serv29090
Modified Files:
gameDetector.cpp
Log Message:
fix handling of last argument: if it's not a valid target, treat it like any other arg (in particular, this is now legal: ./scummvm -f -g hq3x)
Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/base/gameDetector.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- gameDetector.cpp 10 Oct 2003 11:15:14 -0000 1.20
+++ gameDetector.cpp 10 Oct 2003 14:12:01 -0000 1.21
@@ -482,7 +482,11 @@
goto ShowHelpAndExit;
}
} else {
- if (i == (argc - 1)) {
+ // Last argument: this could be a target name.
+ // To verify this, check if there is either a game domain (i.e
+ // a configured target) matching this argument, or if we can
+ // find any target with that name.
+ if (i == (argc - 1) && (ConfMan.hasGameDomain(s) || findTarget(s))) {
setGame(s);
} else {
if (current_option == NULL)
More information about the Scummvm-git-logs
mailing list