mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-30 15:32:47 +00:00
InputCommon: RoundStickGate's ideal sample count can be 1.
This commit is contained in:
parent
459b47295d
commit
f8cca9fe5d
@ -54,7 +54,7 @@ constexpr int ReshapableInput::CALIBRATION_SAMPLE_COUNT;
|
|||||||
|
|
||||||
std::optional<u32> StickGate::GetIdealCalibrationSampleCount() const
|
std::optional<u32> StickGate::GetIdealCalibrationSampleCount() const
|
||||||
{
|
{
|
||||||
return {};
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
OctagonStickGate::OctagonStickGate(ControlState radius) : m_radius(radius)
|
OctagonStickGate::OctagonStickGate(ControlState radius) : m_radius(radius)
|
||||||
@ -86,6 +86,12 @@ ControlState RoundStickGate::GetRadiusAtAngle(double) const
|
|||||||
return m_radius;
|
return m_radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::optional<u32> RoundStickGate::GetIdealCalibrationSampleCount() const
|
||||||
|
{
|
||||||
|
// The "radius" is the same at every angle so a single sample is enough.
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
SquareStickGate::SquareStickGate(ControlState half_width) : m_half_width(half_width)
|
SquareStickGate::SquareStickGate(ControlState half_width) : m_half_width(half_width)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@ class RoundStickGate : public StickGate
|
|||||||
public:
|
public:
|
||||||
explicit RoundStickGate(ControlState radius);
|
explicit RoundStickGate(ControlState radius);
|
||||||
ControlState GetRadiusAtAngle(double ang) const override final;
|
ControlState GetRadiusAtAngle(double ang) const override final;
|
||||||
|
std::optional<u32> GetIdealCalibrationSampleCount() const override final;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const ControlState m_radius;
|
const ControlState m_radius;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user