[Scummvm-cvs-logs] SF.net SVN: scummvm: [23752] scummvm/branches/branch-0-9-0/engines/saga/game.cpp
kirben at users.sourceforge.net
kirben at users.sourceforge.net
Sat Aug 26 13:33:47 CEST 2006
Revision: 23752
Author: kirben
Date: 2006-08-26 04:33:41 -0700 (Sat, 26 Aug 2006)
ViewCVS: http://svn.sourceforge.net/scummvm/?rev=23752&view=rev
Log Message:
-----------
Fix bug #1544801 - ITE: Engine creates launcher entry when failing to launch
Modified Paths:
--------------
scummvm/branches/branch-0-9-0/engines/saga/game.cpp
Modified: scummvm/branches/branch-0-9-0/engines/saga/game.cpp
===================================================================
--- scummvm/branches/branch-0-9-0/engines/saga/game.cpp 2006-08-26 11:33:15 UTC (rev 23751)
+++ scummvm/branches/branch-0-9-0/engines/saga/game.cpp 2006-08-26 11:33:41 UTC (rev 23752)
@@ -76,9 +76,29 @@
}
PluginError Engine_SAGA_create(OSystem *syst, Engine **engine) {
+ assert(syst);
assert(engine);
- *engine = new Saga::SagaEngine(syst);
- return kNoError;
+
+ FSList fslist;
+ FilesystemNode dir(ConfMan.get("path"));
+ if (!dir.listDir(fslist, FilesystemNode::kListFilesOnly)) {
+ warning("SagaEngine: invalid game path '%s'", dir.path().c_str());
+ return kInvalidPathError;
+ }
+
+ // Invoke the detector
+ Common::String gameid = ConfMan.get("gameid");
+ DetectedGameList detectedGames = Engine_SAGA_detectGames(fslist);
+
+ for (uint i = 0; i < detectedGames.size(); i++) {
+ if (detectedGames[i].gameid == gameid) {
+ *engine = new Saga::SagaEngine(syst);
+ return kNoError;
+ }
+ }
+
+ warning("SagaEngine: Unable to locate game data at path '%s'", dir.path().c_str());
+ return kNoGameDataFoundError;
}
REGISTER_PLUGIN(SAGA, "SAGA Engine");
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