diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-09 05:24:31 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-09 05:24:31 +0200 |
commit | 0ed107776321b67cfbc1d3866eacc4f661433171 (patch) | |
tree | ee4a449765edc3b705a088faa6387e4097d104ac | |
parent | config: Remove float {Read,Write}Setting variants (diff) | |
download | yuzu-0ed107776321b67cfbc1d3866eacc4f661433171.tar yuzu-0ed107776321b67cfbc1d3866eacc4f661433171.tar.gz yuzu-0ed107776321b67cfbc1d3866eacc4f661433171.tar.bz2 yuzu-0ed107776321b67cfbc1d3866eacc4f661433171.tar.lz yuzu-0ed107776321b67cfbc1d3866eacc4f661433171.tar.xz yuzu-0ed107776321b67cfbc1d3866eacc4f661433171.tar.zst yuzu-0ed107776321b67cfbc1d3866eacc4f661433171.zip |
-rw-r--r-- | src/common/settings.h | 2 | ||||
-rw-r--r-- | src/input_common/mouse/mouse_poller.cpp | 2 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_input_advanced.ui | 15 |
3 files changed, 8 insertions, 11 deletions
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<bool> mouse_panning{false, "mouse_panning"}; - BasicSetting<float> mouse_panning_sensitivity{1.0f, "mouse_panning_sensitivity"}; + BasicSetting<u8> mouse_panning_sensitivity{1, "mouse_panning_sensitivity"}; BasicSetting<bool> 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<float>(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 @@ </widget> </item> <item row="2" column="2"> - <widget class="QDoubleSpinBox" name="mouse_panning_sensitivity"> + <widget class="QSpinBox" name="mouse_panning_sensitivity"> <property name="toolTip"> <string>Mouse sensitivity</string> </property> <property name="alignment"> <set>Qt::AlignCenter</set> </property> - <property name="decimals"> - <number>2</number> + <property name="suffix"> + <string>%</string> </property> <property name="minimum"> - <double>0.100000000000000</double> + <number>1</number> </property> <property name="maximum"> - <double>16.000000000000000</double> - </property> - <property name="singleStep"> - <double>0.010000000000000</double> + <number>100</number> </property> <property name="value"> - <double>1.000000000000000</double> + <number>100</number> </property> </widget> </item> |