ControllerInterface: Input detection improvements.

This commit is contained in:
Jordan Woyak
2019-02-26 19:46:21 -06:00
parent 13b2b93d3d
commit 48b69ca018
7 changed files with 90 additions and 60 deletions

View File

@ -228,7 +228,7 @@ ControlState Device::Trigger::GetState() const
ControlState Device::Axis::GetState() const
{
return std::max(0.0, ControlState(m_axis) / m_range);
return ControlState(m_axis) / m_range;
}
void Device::Motor::SetState(ControlState state)
@ -236,5 +236,5 @@ void Device::Motor::SetState(ControlState state)
m_motor = (WORD)(state * m_range);
m_parent->UpdateMotors();
}
}
}
} // namespace XInput
} // namespace ciface