[Scummvm-cvs-logs] SF.net SVN: scummvm:[33414] scummvm/trunk
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Tue Jul 29 18:16:15 CEST 2008
Revision: 33414
http://scummvm.svn.sourceforge.net/scummvm/?rev=33414&view=rev
Author: fingolfin
Date: 2008-07-29 16:16:15 +0000 (Tue, 29 Jul 2008)
Log Message:
-----------
Added convenience accessor method GameDescriptor::preferredtarget
Modified Paths:
--------------
scummvm/trunk/base/game.h
scummvm/trunk/gui/launcher.cpp
Modified: scummvm/trunk/base/game.h
===================================================================
--- scummvm/trunk/base/game.h 2008-07-29 16:12:42 UTC (rev 33413)
+++ scummvm/trunk/base/game.h 2008-07-29 16:16:15 UTC (rev 33414)
@@ -92,6 +92,10 @@
const Common::String &description() const { return getVal("description"); }
Common::Language language() const { return contains("language") ? Common::parseLanguage(getVal("language")) : Common::UNK_LANG; }
Common::Platform platform() const { return contains("platform") ? Common::parsePlatform(getVal("platform")) : Common::kPlatformUnknown; }
+
+ const Common::String &preferredtarget() const {
+ return contains("preferredtarget") ? getVal("preferredtarget") : getVal("gameid");
+ }
};
/** List of games. */
Modified: scummvm/trunk/gui/launcher.cpp
===================================================================
--- scummvm/trunk/gui/launcher.cpp 2008-07-29 16:12:42 UTC (rev 33413)
+++ scummvm/trunk/gui/launcher.cpp 2008-07-29 16:16:15 UTC (rev 33414)
@@ -714,13 +714,8 @@
// The auto detector or the user made a choice.
// Pick a domain name which does not yet exist (after all, we
// are *adding* a game to the config, not replacing).
- String domain;
+ String domain = result.preferredtarget();
- if (result.contains("preferredtarget"))
- domain = result["preferredtarget"];
- else
- domain = result.gameid();
-
assert(!domain.empty());
if (ConfMan.hasGameDomain(domain)) {
int suffixN = 1;
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