First fix for wiimote (thx to Darkice). Todo: Fix Access-Violation-Bug.
This commit is contained in:
1 parent
dfb952c1b2
commit
da34aee4a1
1 file changed
+14
-3
@@ -238,11 +238,22 @@ namespace Vocaluxe.Lib.Input.WiiMote
|
||||
}
|
||||
|
||||
//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
|
||||
if (!Connected)
|
||||
Connected = _TryConnect(_PIDPlus);
|
||||
if (Connected = CHIDApi.Open(_VID, _PIDPlus, out _Handle))
|
||||
{
|
||||
if (!(Connected = _ReadCalibration()))
|
||||
CHIDApi.Close(_Handle);
|
||||
}
|
||||
|
||||
|
||||
return Connected;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user