Fix issue #216: Check if a correct XInput device index is passed to isXInputConnected.