mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-12-12 13:55:14 +00:00
configure_input: Use u8 for mouse sensitivity
This commit is contained in:
parent
f9139ddab7
commit
0ed1077763
|
@ -365,7 +365,7 @@ struct Values {
|
||||||
"udp_input_servers"};
|
"udp_input_servers"};
|
||||||
|
|
||||||
BasicSetting<bool> mouse_panning{false, "mouse_panning"};
|
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"};
|
BasicSetting<bool> mouse_enabled{false, "mouse_enabled"};
|
||||||
std::string mouse_device;
|
std::string mouse_device;
|
||||||
MouseButtonsRaw mouse_buttons;
|
MouseButtonsRaw mouse_buttons;
|
||||||
|
|
|
@ -84,7 +84,7 @@ public:
|
||||||
std::lock_guard lock{mutex};
|
std::lock_guard lock{mutex};
|
||||||
const auto axis_value =
|
const auto axis_value =
|
||||||
static_cast<float>(mouse_input->GetMouseState(button).axis.at(axis));
|
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);
|
return axis_value * sensitivity / (100.0f * range);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2573,27 +2573,24 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="2" column="2">
|
<item row="2" column="2">
|
||||||
<widget class="QDoubleSpinBox" name="mouse_panning_sensitivity">
|
<widget class="QSpinBox" name="mouse_panning_sensitivity">
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Mouse sensitivity</string>
|
<string>Mouse sensitivity</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignCenter</set>
|
<set>Qt::AlignCenter</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="decimals">
|
<property name="suffix">
|
||||||
<number>2</number>
|
<string>%</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimum">
|
<property name="minimum">
|
||||||
<double>0.100000000000000</double>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<double>16.000000000000000</double>
|
<number>100</number>
|
||||||
</property>
|
|
||||||
<property name="singleStep">
|
|
||||||
<double>0.010000000000000</double>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="value">
|
<property name="value">
|
||||||
<double>1.000000000000000</double>
|
<number>100</number>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Reference in a new issue