internal WiimoteDeviceInfo(BluetoothDeviceInfo bt) { Bluetooth = bt; HID = HIDDeviceInfo.GetDevice(bt.Address); if (HID == null) { throw new IOException("Error opening HID device!"); } Type = GetTypeFromName(bt.Name); }
internal WiimoteDeviceInfo(string hidPath, bool dolphinBarMode) { HID = HIDDeviceInfo.GetDevice(hidPath); if (HID == null) { throw new IOException("Error opening HID device!"); } if (dolphinBarMode) { Bluetooth = new BluetoothDeviceInfo(); Type = GetTypeFromPID(HID.ProductID); } else { Bluetooth = WiimoteRegistry.GetBluetoothDevice(hidPath); if (Bluetooth == null) { throw new IOException("Error locating Bluetooth device!"); } Type = GetTypeFromName(Bluetooth.Name); } }