internal void DeviceChanged(IMessageDeviceStatus message) { if (message == null) { return; } if (message.Type == MessageType.DeviceAdded) { using (IDeviceHandle handle = message.DeviceHandle) { if (handle.DeviceType == DeviceType.HMD) { AddDevice((IDeviceHandle <IHMDDevice, IHMDInfo>)handle); } } } else if (message.Type == MessageType.DeviceRemoved) { using (IDeviceHandle handle = message.DeviceHandle) { if (handle.DeviceType == DeviceType.Sensor) { RemoveDevice((IDeviceHandle <ISensorDevice, ISensorInfo>)handle); } } } }
internal void DeviceChanged(IMessageDeviceStatus message) { if (message == null) return; if (message.Type == MessageType.DeviceAdded) { using (IDeviceHandle handle = message.DeviceHandle) { if (handle.DeviceType == DeviceType.HMD) { AddDevice((IDeviceHandle<IHMDDevice, IHMDInfo>) handle); } } } else if (message.Type == MessageType.DeviceRemoved) { using (IDeviceHandle handle = message.DeviceHandle) { if (handle.DeviceType == DeviceType.Sensor) { RemoveDevice((IDeviceHandle<ISensorDevice, ISensorInfo>) handle); } } } }