WiimoteEmu: Allow shake frequency and intensity to be configured. Other minor cleanups.

This commit is contained in:
Jordan Woyak 2019-03-29 14:39:48 -05:00
parent 635fd8c22c
commit c89ddf8cba
24 changed files with 285 additions and 313 deletions

View file

@ -272,8 +272,7 @@ ReshapableInput::ReshapeData ReshapableInput::Reshape(ControlState x, ControlSta
}
// Apply deadzone as a percentage of the user-defined calibration shape/size:
const ControlState deadzone = GetDeadzonePercentage();
dist = std::max(0.0, dist - deadzone) / (1.0 - deadzone);
dist = ApplyDeadzone(dist, GetDeadzonePercentage());
// Scale to the gate shape/radius:
dist *= gate_max_dist;