diff --git a/apps/openmw/mwinput/inputmanagerimp.cpp b/apps/openmw/mwinput/inputmanagerimp.cpp index 6a6ac20a8..581a96e7b 100644 --- a/apps/openmw/mwinput/inputmanagerimp.cpp +++ b/apps/openmw/mwinput/inputmanagerimp.cpp @@ -77,6 +77,7 @@ namespace MWInput , mSneaking(false) , mAttemptJump(false) , mInvUiScalingFactor(1.f) + , mGamepadCursorSpeed(Settings::Manager::getFloat("gamepad cursor speed", "Input")) , mFakeDeviceID(1) { mInputManager = new SDLUtil::InputWrapper(window, viewer, grab); @@ -558,8 +559,8 @@ namespace MWInput // We keep track of our own mouse position, so that moving the mouse while in // game mode does not move the position of the GUI cursor - float xmove = xAxis * dt * 1500.0f * mInvUiScalingFactor; - float ymove = yAxis * dt * 1500.0f * mInvUiScalingFactor; + float xmove = xAxis * dt * 1500.0f * mInvUiScalingFactor * mGamepadCursorSpeed; + float ymove = yAxis * dt * 1500.0f * mInvUiScalingFactor * mGamepadCursorSpeed; if (xmove != 0|| ymove != 0 || zAxis != 0) { mGuiCursorX += xmove; diff --git a/apps/openmw/mwinput/inputmanagerimp.hpp b/apps/openmw/mwinput/inputmanagerimp.hpp index 8b3253dcd..caf57681d 100644 --- a/apps/openmw/mwinput/inputmanagerimp.hpp +++ b/apps/openmw/mwinput/inputmanagerimp.hpp @@ -209,6 +209,7 @@ namespace MWInput std::map mControlSwitch; float mInvUiScalingFactor; + float mGamepadCursorSpeed; private: void convertMousePosForMyGUI(int& x, int& y); diff --git a/docs/source/reference/modding/settings/input.rst b/docs/source/reference/modding/settings/input.rst index 51c72e15d..d481321c2 100644 --- a/docs/source/reference/modding/settings/input.rst +++ b/docs/source/reference/modding/settings/input.rst @@ -133,3 +133,16 @@ which are always sent if a controller is present and detected. Disabling this setting can be useful for working around controller-related issues or for setting up split-screen gameplay configurations. This setting can be toggled in game with the Enable Joystick button in the Controls panel of the Options menu. + +gamepad cursor speed +-------------------- + +:Type: float +:Range: >0 +:Default: 1.0 + +This setting controls the speed of the cursor within GUI mode when using the joystick. +This setting has no effect on the camera rotation speed, which is controlled by the +camera sensitivity setting. + +This setting can only be configured by editing the settings configuration file. diff --git a/files/settings-default.cfg b/files/settings-default.cfg index d3776e92f..d16e8c92c 100644 --- a/files/settings-default.cfg +++ b/files/settings-default.cfg @@ -364,6 +364,9 @@ invert y axis = false # Enable controller support. enable controller = true +# Emulated gamepad cursor sensitivity. +gamepad cursor speed = 1.0 + [Saves] # Name of last character played, and default for loading save files.