/// <summary> /// Called when the NoiseFilter gets applied to a device, marks out any controls that can be wholly bitmasked. /// </summary> /// <param name="noiseFilterBuffer">The Noisefilter buffer for doing whole control filtering.</param> /// <param name="device">The device you want to apply filtering to.</param> public void Apply(IntPtr noiseFilterBuffer, InputDevice device) { if (controlIndex >= device.allControls.Count) { throw new IndexOutOfRangeException("NoiseFilter has array index beyond total size of device's controls"); } InputControl control = device.allControls[controlIndex]; BitmaskHelpers.Blacklist(noiseFilterBuffer, control); }