diff options
author | Filippos Karapetis | 2012-03-31 13:55:03 +0300 |
---|---|---|
committer | Filippos Karapetis | 2012-03-31 13:55:03 +0300 |
commit | 6a49d3eadd7555a4f5f539ceb73fdfe370fce9da (patch) | |
tree | 9bee862bbd896efe29573c73938f84159be8e5b1 /engines/advancedDetector.cpp | |
parent | 7f9c63239b2f360b6d96e8ff4dd007b80d990e46 (diff) | |
download | scummvm-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.cpp | 13 |
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)) |