From a3752da79f3785ed814d0ca75fe201269449c2cc Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 8 Jun 2014 19:50:39 +0200 Subject: [PATCH] Store Always Run control state in settings --- apps/openmw/mwinput/inputmanagerimp.cpp | 4 +++- files/settings-default.cfg | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwinput/inputmanagerimp.cpp b/apps/openmw/mwinput/inputmanagerimp.cpp index 943453a39..f75dc7ff0 100644 --- a/apps/openmw/mwinput/inputmanagerimp.cpp +++ b/apps/openmw/mwinput/inputmanagerimp.cpp @@ -117,7 +117,7 @@ namespace MWInput , mPreviewPOVDelay(0.f) , mTimeIdle(0.f) , mOverencumberedMessageDelay(0.f) - , mAlwaysRunActive(false) + , mAlwaysRunActive(Settings::Manager::getBool("always run", "Input")) , mControlsDisabled(false) { @@ -819,6 +819,8 @@ namespace MWInput { if (MWBase::Environment::get().getWindowManager()->isGuiMode()) return; mAlwaysRunActive = !mAlwaysRunActive; + + Settings::Manager::setBool("always run", "Input", mAlwaysRunActive); } void InputManager::resetIdleTime() diff --git a/files/settings-default.cfg b/files/settings-default.cfg index 9eed2c7d9..2ed3d6cb9 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -168,6 +168,8 @@ camera y multiplier = 1.0 ui y multiplier = 1.0 +always run = false + [Game] # Always use the most powerful attack when striking with a weapon (chop, slash or thrust) best attack = false