aboutsummaryrefslogtreecommitdiff
path: root/engines/advancedDetector.cpp
diff options
context:
space:
mode:
authorFilippos Karapetis2012-03-31 13:55:03 +0300
committerFilippos Karapetis2012-03-31 13:55:03 +0300
commit6a49d3eadd7555a4f5f539ceb73fdfe370fce9da (patch)
tree9bee862bbd896efe29573c73938f84159be8e5b1 /engines/advancedDetector.cpp
parent7f9c63239b2f360b6d96e8ff4dd007b80d990e46 (diff)
downloadscummvm-rg350-6a49d3eadd7555a4f5f539ceb73fdfe370fce9da.tar.gz
scummvm-rg350-6a49d3eadd7555a4f5f539ceb73fdfe370fce9da.tar.bz2
scummvm-rg350-6a49d3eadd7555a4f5f539ceb73fdfe370fce9da.zip
ENGINES: Return all available custom GUI options if no target is specified
This is used to set default settings for all custom game options when an engine starts
Diffstat (limited to 'engines/advancedDetector.cpp')
-rw-r--r--engines/advancedDetector.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index dc7f7e007c..ac06e74e0a 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -171,12 +171,21 @@ const ExtraGuiOptions AdvancedMetaEngine::getExtraGuiOptions(const Common::Strin
if (!_extraGuiOptions)
return ExtraGuiOptions();
+ ExtraGuiOptions options;
+
+ // If there isn't any target specified, return all available GUI options.
+ // Only used when an engine starts in order to set option defaults.
+ if (target.empty()) {
+ for (const ADExtraGuiOptionsMap *entry = _extraGuiOptions; entry->guioFlag; ++entry)
+ options.push_back(entry->option);
+
+ return options;
+ }
+
// Query the GUI options
const Common::String guiOptionsString = ConfMan.get("guioptions", target);
const Common::String guiOptions = parseGameGUIOptions(guiOptionsString);
- ExtraGuiOptions options;
-
// Add all the applying extra GUI options.
for (const ADExtraGuiOptionsMap *entry = _extraGuiOptions; entry->guioFlag; ++entry) {
if (guiOptions.contains(entry->guioFlag))