[Scummvm-cvs-logs] SF.net SVN: scummvm: [23427] scummvm/branches/branch-0-9-0/engines/kyra
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Sat Jul 8 16:53:30 CEST 2006
Revision: 23427
Author: lordhoto
Date: 2006-07-08 07:53:24 -0700 (Sat, 08 Jul 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=23427&view=rev
Log Message:
-----------
Changes init error handling of kyra engine (engine fails at Engine_KYRA_create now instead of KyraEngine::init when no game is found, also adds check for invalid
game path like the scumm engine does). (backport)
Modified Paths:
--------------
scummvm/branches/branch-0-9-0/engines/kyra/kyra.cpp
scummvm/branches/branch-0-9-0/engines/kyra/plugin.cpp
Modified: scummvm/branches/branch-0-9-0/engines/kyra/kyra.cpp
===================================================================
--- scummvm/branches/branch-0-9-0/engines/kyra/kyra.cpp 2006-07-08 14:51:26 UTC (rev 23426)
+++ scummvm/branches/branch-0-9-0/engines/kyra/kyra.cpp 2006-07-08 14:53:24 UTC (rev 23427)
@@ -115,10 +115,6 @@
}
int KyraEngine::init() {
- if (setupGameFlags()) {
- return -1;
- }
-
// Setup mixer
if (!_mixer->isReady()) {
warning("Sound initialization failed.");
Modified: scummvm/branches/branch-0-9-0/engines/kyra/plugin.cpp
===================================================================
--- scummvm/branches/branch-0-9-0/engines/kyra/plugin.cpp 2006-07-08 14:51:26 UTC (rev 23426)
+++ scummvm/branches/branch-0-9-0/engines/kyra/plugin.cpp 2006-07-08 14:53:24 UTC (rev 23427)
@@ -281,6 +281,21 @@
#endif
} else
error("Kyra engine created with invalid gameid.");
+
+ FSList fslist;
+ FilesystemNode dir(ConfMan.get("path"));
+ if (!dir.listDir(fslist, FilesystemNode::kListFilesOnly)) {
+ warning("KyraEngine: invalid game path '%s'", dir.path().c_str());
+ return kInvalidPathError;
+ }
+
+ if (*engine) {
+ if (((KyraEngine*)(*engine))->setupGameFlags()) {
+ warning("KyraEngine: unable to locate game data at path '%s'", dir.path().c_str());
+ delete *engine;
+ return kNoGameDataFoundError;
+ }
+ }
return kNoError;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list