From 00cc45c5371913d2d4965ffc065e43c10c74042e Mon Sep 17 00:00:00 2001 From: scrawl Date: Mon, 2 Apr 2012 16:10:54 +0200 Subject: [PATCH] FPS is now a setting instead of commandline option --- apps/openmw/engine.cpp | 2 ++ apps/openmw/main.cpp | 4 ---- files/settings-default.cfg | 8 ++++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 1722be675..cfcf9f76b 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -343,6 +343,8 @@ void OMW::Engine::go() else if (boost::filesystem::exists(globaldefault)) settings.loadUser(globaldefault); + mFpsLevel = settings.getInt("fps", "HUD"); + mOgre->configure(!boost::filesystem::is_regular_file(mCfgMgr.getOgreConfigPath()), mCfgMgr.getOgreConfigPath().string(), mCfgMgr.getLogPath().string(), diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index cd1e0e26e..a5e5c99e6 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -92,9 +92,6 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat ("plugin", bpo::value()->default_value(StringsVector(), "") ->multitoken(), "plugin file(s)") - ("fps", boost::program_options::value()->implicit_value(1) - ->default_value(0), "fps counter detail (0 = off, 1 = fps counter, 2 = full detail)") - ("anim-verbose", boost::program_options::value()->implicit_value(true) ->default_value(false), "output animation indices files") @@ -225,7 +222,6 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat engine.setNewGame(variables["new-game"].as()); // other settings - engine.showFPS(variables["fps"].as()); engine.setDebugMode(variables["debug"].as()); engine.setSoundUsage(!variables["nosound"].as()); engine.setScriptsVerbosity(variables["script-verbose"].as()); diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 345977922..6372a31c1 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -1,3 +1,11 @@ +[HUD] + +# FPS counter +# 0: not visible +# 1: basic FPS display +# 2: advanced FPS display (batches, triangles) +fps = 0 + [Objects] shaders = true