From 83726ee06a3a38f098a392722379d0055b30a110 Mon Sep 17 00:00:00 2001 From: scrawl <720642+scrawl@users.noreply.github.com> Date: Thu, 11 Jan 2018 01:47:42 +0000 Subject: [PATCH] Fix Reset Controls button not functioning properly --- apps/openmw/mwinput/inputmanagerimp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwinput/inputmanagerimp.cpp b/apps/openmw/mwinput/inputmanagerimp.cpp index 3e96f6da9..400dd7213 100644 --- a/apps/openmw/mwinput/inputmanagerimp.cpp +++ b/apps/openmw/mwinput/inputmanagerimp.cpp @@ -1242,13 +1242,13 @@ namespace MWInput clearAllKeyBindings(control); if (defaultKeyBindings.find(i) != defaultKeyBindings.end() - && !mInputBinder->isKeyBound(defaultKeyBindings[i])) + && (force || !mInputBinder->isKeyBound(defaultKeyBindings[i]))) { control->setInitialValue(0.0f); mInputBinder->addKeyBinding(control, defaultKeyBindings[i], ICS::Control::INCREASE); } else if (defaultMouseButtonBindings.find(i) != defaultMouseButtonBindings.end() - && !mInputBinder->isMouseButtonBound(defaultMouseButtonBindings[i])) + && (force || !mInputBinder->isMouseButtonBound(defaultMouseButtonBindings[i]))) { control->setInitialValue(0.0f); mInputBinder->addMouseButtonBinding (control, defaultMouseButtonBindings[i], ICS::Control::INCREASE); @@ -1322,12 +1322,12 @@ namespace MWInput clearAllControllerBindings(control); if (defaultButtonBindings.find(i) != defaultButtonBindings.end() - && !mInputBinder->isJoystickButtonBound(mFakeDeviceID, defaultButtonBindings[i])) + && (force || !mInputBinder->isJoystickButtonBound(mFakeDeviceID, defaultButtonBindings[i]))) { control->setInitialValue(0.0f); mInputBinder->addJoystickButtonBinding(control, mFakeDeviceID, defaultButtonBindings[i], ICS::Control::INCREASE); } - else if (defaultAxisBindings.find(i) != defaultAxisBindings.end() && !mInputBinder->isJoystickAxisBound(mFakeDeviceID, defaultAxisBindings[i])) + else if (defaultAxisBindings.find(i) != defaultAxisBindings.end() && (force || !mInputBinder->isJoystickAxisBound(mFakeDeviceID, defaultAxisBindings[i]))) { control->setValue(0.5f); control->setInitialValue(0.5f);