예제 #1
0
 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);
 }
예제 #2
0
 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);
     }
 }