internal InputDevice(InputService service, DeviceBucket bucket, InputDeviceDescriptor desc) { this.service = service; this.bucket = bucket; this.desc = desc; this.buttonStates = new bool[desc.ButtonCount]; this.axisStates = new long[desc.AxisCount]; }
void Dispose(bool fin) { if (bucket != null) { bucket.UseCount--; if (bucket.UseCount <= 0 && !fin) { bucket.Device.Dispose(); bucket.Device = null; } bucket = null; service = null; } if (!fin) { GC.SuppressFinalize(this); } }