From 0ed107776321b67cfbc1d3866eacc4f661433171 Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Thu, 8 Jul 2021 23:24:31 -0400 Subject: configure_input: Use u8 for mouse sensitivity --- src/common/settings.h | 2 +- src/input_common/mouse/mouse_poller.cpp | 2 +- src/yuzu/configuration/configure_input_advanced.ui | 15 ++++++--------- 3 files changed, 8 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/common/settings.h b/src/common/settings.h index 898798212..7c6878f62 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -365,7 +365,7 @@ struct Values { "udp_input_servers"}; BasicSetting mouse_panning{false, "mouse_panning"}; - BasicSetting mouse_panning_sensitivity{1.0f, "mouse_panning_sensitivity"}; + BasicSetting mouse_panning_sensitivity{1, "mouse_panning_sensitivity"}; BasicSetting mouse_enabled{false, "mouse_enabled"}; std::string mouse_device; MouseButtonsRaw mouse_buttons; diff --git a/src/input_common/mouse/mouse_poller.cpp b/src/input_common/mouse/mouse_poller.cpp index 45b3d7340..1e84eaddd 100644 --- a/src/input_common/mouse/mouse_poller.cpp +++ b/src/input_common/mouse/mouse_poller.cpp @@ -84,7 +84,7 @@ public: std::lock_guard lock{mutex}; const auto axis_value = static_cast(mouse_input->GetMouseState(button).axis.at(axis)); - const float sensitivity = Settings::values.mouse_panning_sensitivity.GetValue(); + const float sensitivity = Settings::values.mouse_panning_sensitivity.GetValue() * 0.15f; return axis_value * sensitivity / (100.0f * range); } diff --git a/src/yuzu/configuration/configure_input_advanced.ui b/src/yuzu/configuration/configure_input_advanced.ui index 173130d8d..d3ef5bd06 100644 --- a/src/yuzu/configuration/configure_input_advanced.ui +++ b/src/yuzu/configuration/configure_input_advanced.ui @@ -2573,27 +2573,24 @@ - + Mouse sensitivity Qt::AlignCenter - - 2 + + % - 0.100000000000000 + 1 - 16.000000000000000 - - - 0.010000000000000 + 100 - 1.000000000000000 + 100 -- cgit v1.2.3