From b81df8af9c42da9ead15791ce020ac085bbad494 Mon Sep 17 00:00:00 2001 From: psi29a Date: Fri, 1 Oct 2021 11:23:53 +0000 Subject: [PATCH] Merge branch 'cursorspeedmerge' into 'master' Updated: Change cursor speed with settings.cfg (#6312) Closes #6312 See merge request OpenMW/openmw!1255 (cherry picked from commit 1d342f80ed1af25d3cf1f70759be7fba1c9237b2) b5af1928 gamepad cursor speed fix --- AUTHORS.md | 1 + apps/openmw/mwinput/controllermanager.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 75302908e..5ade21d41 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -222,6 +222,7 @@ Programmers Yuri Krupenin zelurker Noah Gooder + Andrew Appuhamy (andrew-app) Documentation ------------- diff --git a/apps/openmw/mwinput/controllermanager.cpp b/apps/openmw/mwinput/controllermanager.cpp index 03d492c9c..abb214710 100644 --- a/apps/openmw/mwinput/controllermanager.cpp +++ b/apps/openmw/mwinput/controllermanager.cpp @@ -98,8 +98,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 uiScale = MWBase::Environment::get().getWindowManager()->getScalingFactor(); - float xMove = xAxis * dt * 1500.0f / uiScale; - float yMove = yAxis * dt * 1500.0f / uiScale; + float xMove = xAxis * dt * 1500.0f / uiScale * mGamepadCursorSpeed; + float yMove = yAxis * dt * 1500.0f / uiScale * mGamepadCursorSpeed; float mouseWheelMove = -zAxis * dt * 1500.0f; if (xMove != 0 || yMove != 0 || mouseWheelMove != 0)