ChristianLa91 / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

Controller with UserIndex.Any has IsConnected always true #885

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
controller = new Controller(UserIndex.Any);
if (controller.IsConnected)
{
    State state = controller.GetState();
}

When using the UserIndex.Any value while constructing a Controller object, the 
IsConnected parameter will always evaluate to true. This causes a GetState() 
call on the object to throw an XInputException (ERROR_BAD_ARGUMENTS: n/a 
(-2147024736))

This occurs even when no controller is connected to the PC at all.

Original issue reported on code.google.com by dekkerch...@gmail.com on 12 Sep 2012 at 2:20

GoogleCodeExporter commented 9 years ago
It looks like UserIndex.Any isn't a valid index for creating a controller. The 
docs state that you must pass a value from 0 to 3. I'm going to add an 
exception here to make this more explicit.

Original comment by Mike.Popoloski on 15 Sep 2012 at 6:46

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2208.

Original comment by Mike.Popoloski on 15 Sep 2012 at 6:51