mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
configure_input: Use u8 for mouse sensitivity
This commit is contained in:
parent
f9139ddab7
commit
0ed1077763
3 changed files with 8 additions and 11 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue