From c84cd8dee83fe42263f82ae3bb603360b99e0b0a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 27 Feb 2012 22:50:01 +0200 Subject: GUI: Add per-engine and per-game options --- base/main.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'base/main.cpp') diff --git a/base/main.cpp b/base/main.cpp index 391d911ae8..99dcac63d3 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -195,7 +195,7 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const } // On creation the engine should have set up all debug levels so we can use - // the command line arugments here + // the command line arguments here Common::StringTokenizer tokenizer(edebuglevels, " ,"); while (!tokenizer.empty()) { Common::String token = tokenizer.nextToken(); @@ -206,6 +206,12 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const // Initialize any game-specific keymaps engine->initKeymap(); + // Set default values to the custom engine options + const ExtraGuiOptions engineOptions = (*plugin)->getExtraGuiOptions(ConfMan.getActiveDomainName()); + for (uint i = 0; i < engineOptions.size(); i++) { + ConfMan.registerDefault(engineOptions[i].configOption, engineOptions[i].defaultState); + } + // Inform backend that the engine is about to be run system.engineInit(); -- cgit v1.2.3