diff options
author | bunnei <bunneidev@gmail.com> | 2021-02-11 09:58:23 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-11 09:58:23 -0800 |
commit | e53b6ecc76cf8fe670e5056f75d8e798da66f9ff (patch) | |
tree | 21c0ed620d025fa8ab30465c83dfe57e4888816b /src/input_common/mouse/mouse_poller.cpp | |
parent | f06c3f4907fad252189980051b6ad27a84ffaaf5 (diff) | |
parent | 52b79ac00965aaf10db1a181067c2f2d33125171 (diff) |
Merge pull request #5869 from german77/mousePanning
input_common: Add mouse panning
Diffstat (limited to 'src/input_common/mouse/mouse_poller.cpp')
-rw-r--r-- | src/input_common/mouse/mouse_poller.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/input_common/mouse/mouse_poller.cpp b/src/input_common/mouse/mouse_poller.cpp index 3d799b2937..bb56787ee3 100644 --- a/src/input_common/mouse/mouse_poller.cpp +++ b/src/input_common/mouse/mouse_poller.cpp @@ -6,6 +6,7 @@ #include <utility> #include "common/threadsafe_queue.h" +#include "core/settings.h" #include "input_common/mouse/mouse_input.h" #include "input_common/mouse/mouse_poller.h" @@ -71,7 +72,7 @@ public: std::lock_guard lock{mutex}; const auto axis_value = static_cast<float>(mouse_input->GetMouseState(button).axis.at(axis)); - return axis_value / (100.0f * range); + return axis_value * Settings::values.mouse_panning_sensitivity / (100.0f * range); } std::pair<float, float> GetAnalog(u32 analog_axis_x, u32 analog_axis_y) const { |