mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-14 00:58:51 +02:00
InputCommon: Eliminate some duplicated button threshold logic.
This commit is contained in:
@ -32,7 +32,7 @@ Slider::Slider(const std::string& name_) : Slider(name_, name_)
|
||||
Slider::StateData Slider::GetState()
|
||||
{
|
||||
const ControlState deadzone = m_deadzone_setting.GetValue() / 100;
|
||||
const ControlState state = controls[1]->control_ref->State() - controls[0]->control_ref->State();
|
||||
const ControlState state = controls[1]->GetState() - controls[0]->GetState();
|
||||
|
||||
return {std::clamp(ApplyDeadzone(state, deadzone), -1.0, 1.0)};
|
||||
}
|
||||
|
Reference in New Issue
Block a user