Prevent deadzone and bitrate from dropping below 1

This commit is contained in:
Cameron Gutman
2014-11-19 20:11:13 -08:00
parent e3a477a243
commit c96f9fb635
2 changed files with 14 additions and 2 deletions

View File

@@ -49,6 +49,12 @@ public class ControllerHandler {
public ControllerHandler(NvConnection conn, int deadzonePercentage) {
this.conn = conn;
// 1% is the lowest possible deadzone we support
if (deadzonePercentage <= 0) {
deadzonePercentage = 1;
}
this.stickDeadzone = (double)deadzonePercentage / 100.0;
// We want limelight-common to scale the axis values to match Xinput values