First fix for wiimote (thx to Darkice). Todo: Fix Access-Violation-Bug.

This commit is contained in:
Florian Küpper committed 2013-08-24 23:04:52 +02:00
1 parent dfb952c1b2
commit da34aee4a1
1 file changed
+14 -3
+14 -3
View File
@@ -238,11 +238,22 @@ namespace Vocaluxe.Lib.Input.WiiMote
} }
//Try WiiMotion //Try WiiMotion
Connected = _TryConnect(_PID); if (Connected = CHIDApi.Open(_VID, _PID, out _Handle))
{
if (!(Connected = _ReadCalibration()))
CHIDApi.Close(_Handle);
}
if (Connected)
return true;
//Try WiiMotion Plus //Try WiiMotion Plus
if (!Connected) if (Connected = CHIDApi.Open(_VID, _PIDPlus, out _Handle))
Connected = _TryConnect(_PIDPlus); {
if (!(Connected = _ReadCalibration()))
CHIDApi.Close(_Handle);
}
return Connected; return Connected;
} }