public override ControlEvent UpdateValue(Ps3InputData data) { var b = data.GetByte(_index); if (b == _byte) return null; _byte = b; var value = _value = b / 255f; return new ControlEvent(Ps3ControlInfo.ControlId, value); }
public override ControlEvent UpdateValue(Ps3InputData data) { var b = data.GetByte(_index); if (b == _byte) { return(null); } _byte = b; var value = _value = (b - 127.5f) / 127.5f; return(new ControlEvent(Ps3ControlInfo.ControlId, value)); }
public override ControlEvent UpdateValue(Ps3InputData data) { var b = data.GetByte(_index) != 0; if (b == _bit) { return(null); } _bit = b; var value = _value = b ? 1f : 0f; return(new ControlEvent(Ps3ControlInfo.ControlId, value)); }