View Single Post
Old 03-16-2015, 10:31 AM
shivanangel shivanangel is offline
Join Date: Feb 2006
Location: New Jersey
Posts: 182
Question Joystick and XBox Controller in DirectInput?

I am using your example in the Joystick basics to connect to an XBox controller through the new directInput module.

When I call addJoystick(), I get an JoystickSensor, which does not let me call the <xbox>.getControllerID() method.

Do I typecast this to some type? Do I need to use a different method to get access to the actual Xbox methods?

There is nothing in the documentation, so could you please add it in the future? I already printed out the information on the device and it returns true for the isXboxController.

Also, could you please consider changing <xbox>.getControllerID to <xbox>getControllerId to follow capitalization convention better?

Reply With Quote