mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Add mixed comments to input code, make some tooltip clearer
This commit is contained in:
@ -44,7 +44,7 @@ void ControlGroup::AddDeadzoneSetting(SettingValue<double>* value, double maximu
|
||||
// i18n: The percent symbol.
|
||||
_trans("%"),
|
||||
// i18n: Refers to the dead-zone setting of gamepad inputs.
|
||||
_trans("Input strength to ignore.")},
|
||||
_trans("Input strength to ignore and remap.")},
|
||||
0, 0, maximum_deadzone);
|
||||
}
|
||||
|
||||
|
@ -40,7 +40,7 @@ IMUGyroscope::IMUGyroscope(std::string name_, std::string ui_name_)
|
||||
// i18n: "°/s" is the symbol for degrees (angular measurement) divided by seconds.
|
||||
_trans("°/s"),
|
||||
// i18n: Refers to the dead-zone setting of gyroscope input.
|
||||
_trans("Angular velocity to ignore.")},
|
||||
_trans("Angular velocity to ignore and remap.")},
|
||||
2, 0, 180);
|
||||
|
||||
AddSetting(&m_calibration_period_setting,
|
||||
|
@ -128,6 +128,7 @@ std::optional<u32> SquareStickGate::GetIdealCalibrationSampleCount() const
|
||||
ReshapableInput::ReshapableInput(std::string name_, std::string ui_name_, GroupType type_)
|
||||
: ControlGroup(std::move(name_), std::move(ui_name_), type_)
|
||||
{
|
||||
// 50 is not always enough but users can set it to more with an expression
|
||||
AddDeadzoneSetting(&m_deadzone_setting, 50);
|
||||
}
|
||||
|
||||
@ -285,6 +286,10 @@ ReshapableInput::ReshapeData ReshapableInput::Reshape(ControlState x, ControlSta
|
||||
x -= m_center.x;
|
||||
y -= m_center.y;
|
||||
|
||||
// We run this even if both x and y will be zero.
|
||||
// In that case, std::atan2(0, 0) returns a valid non-NaN value, but the exact value
|
||||
// (which depends on the signs of x and y) does not matter here as dist is zero
|
||||
|
||||
// TODO: make the AtAngle functions work with negative angles:
|
||||
ControlState angle = std::atan2(y, x) + MathUtil::TAU;
|
||||
|
||||
|
Reference in New Issue
Block a user