diff options
author | Max Horn | 2006-03-09 02:52:51 +0000 |
---|---|---|
committer | Max Horn | 2006-03-09 02:52:51 +0000 |
commit | 86565fcca57454e91124410cfd6864ef1e202dc0 (patch) | |
tree | 83cc82217179d56f23836628520b7f63b4a0607d /gui/launcher.cpp | |
parent | d2f78184af00cd91f3f1f251199a436b53f4ae64 (diff) | |
download | scummvm-rg350-86565fcca57454e91124410cfd6864ef1e202dc0.tar.gz scummvm-rg350-86565fcca57454e91124410cfd6864ef1e202dc0.tar.bz2 scummvm-rg350-86565fcca57454e91124410cfd6864ef1e202dc0.zip |
- Renamed GameSettings to PlainGameDescriptor
- Added new GameDescriptor struct (similar to PlainGameDescriptor but with
Common::String members instead of const char * ones)
- Changed DetectedGame to subclass GameDescriptor
- Removed toGameSettings() in favor of new (template) constructors in
DetectedGame and GameDescriptor
- Fixed a bug in the obsolete gameid handling in the SCUMM & SIMON engines
svn-id: r21150
Diffstat (limited to 'gui/launcher.cpp')
-rw-r--r-- | gui/launcher.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 24723ce3d1..ceb202dee0 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -114,7 +114,7 @@ class EditGameDialog : public OptionsDialog { typedef Common::String String; typedef Common::StringList StringList; public: - EditGameDialog(const String &domain, const char *desc); + EditGameDialog(const String &domain, const String &desc); void open(); void close(); @@ -137,7 +137,7 @@ protected: CheckboxWidget *_globalVolumeOverride; }; -EditGameDialog::EditGameDialog(const String &domain, const char *desc) +EditGameDialog::EditGameDialog(const String &domain, const String &desc) : OptionsDialog(domain, 10, 40, 320 - 2 * 10, 140) { const int screenW = g_system->getOverlayWidth(); @@ -176,7 +176,7 @@ EditGameDialog::EditGameDialog(const String &domain, const char *desc) // GAME: Determine the description string String description(ConfMan.get("description", domain)); - if (description.isEmpty() && desc) { + if (description.isEmpty() && !desc.isEmpty()) { description = desc; } @@ -570,8 +570,8 @@ void LauncherDialog::updateListing() { if (gameid.isEmpty()) gameid = iter->_key; if (description.isEmpty()) { - GameSettings g = GameDetector::findGame(gameid); - if (g.description) + GameDescriptor g = GameDetector::findGame(gameid); + if (!g.description.isEmpty()) description = g.description; } @@ -667,17 +667,16 @@ void LauncherDialog::addGame() { // Adapt the description string if custom platform/language is set if (customLanguage || customPlatform) { - String desc = result.description; - desc += " ("; + result.description += " ("; if (customLanguage) - desc += Common::getLanguageDescription(result.language); + result.description += Common::getLanguageDescription(result.language); if (customLanguage && customPlatform) - desc += "/"; + result.description += "/"; if (customPlatform) - desc += Common::getPlatformDescription(result.platform); - desc += ")"; + result.description += Common::getPlatformDescription(result.platform); + result.description += ")"; - ConfMan.set("description", desc, domain); + ConfMan.set("description", result.description, domain); } // Display edit dialog for the new entry |