[Scummvm-cvs-logs] CVS: scummvm/scumm scumm.cpp,1.484,1.485
Max Horn
fingolfin at users.sourceforge.net
Thu May 5 05:04:40 CEST 2005
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3975/scumm
Modified Files:
scumm.cpp
Log Message:
Return 0 in Engine_SCUMM_create if the game isn't found (instead of computing the MD5 of non-existant files)
Index: scumm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.cpp,v
retrieving revision 1.484
retrieving revision 1.485
diff -u -d -r1.484 -r1.485
--- scumm.cpp 3 May 2005 02:23:15 -0000 1.484
+++ scumm.cpp 5 May 2005 12:03:16 -0000 1.485
@@ -2658,8 +2658,10 @@
break;
g++;
}
- if (!g->name)
+ if (!g->name) {
error("Invalid game '%s'\n", detector->_game.name);
+ return 0;
+ }
ScummGameSettings game = *g;
@@ -2687,14 +2689,20 @@
}
strcpy(tempName, detectName);
- File f;
-
+ bool found = false;
while (substLastIndex != -1) {
- if (f.exists(detectName, ConfMan.get("path").c_str()))
+ if (File::exists(detectName, ConfMan.get("path").c_str())) {
+ found = true;
break;
+ }
substLastIndex = generateSubstResFileName_(tempName, detectName, sizeof(detectName), substLastIndex + 1);
}
+
+ // Unable to locate game data
+ if (!found) {
+ return 0;
+ }
// Force game to have Mac platform if needed
if (substLastIndex > 0) {
More information about the Scummvm-git-logs
mailing list