I changed the axisMoved function in the demo to actually display data:
bool axisMoved( const JoyStickEvent &arg, int axis ) {
if( arg.state.mAxes[axis].abX<1024 && arg.state.mAxes[axis].abX>-1024 &&
arg.state.mAxes[axis].abY<1024 && arg.state.mAxes[axis].abY>-1024)
return true;
std::cout << "\nJoy AxisMoved: " << axis << " Abs(" << arg.state.mAxes[axis].abX << "," << arg.state.mAxes[axis].abY << "," << arg.state.mAxes[axis].abZ << ")";
return true;
}
When I use my joystick, the buttons and axis return very odd data.
First of all, using the test in the game controllers dialog in the control panel works perfect, no delay, just perfect in every way. The joystick demo in the DX SDK works identically to the game controllers, perfect. This commandline demo however, runs oddly. First of all, buttons are not always regestered as being pressed, and even more rare is it receiving a released signal. It happens with all twenty buttons on the gamepad. The axis also receives intermitent updates, not to mention it always returns zero for the axis, and the results of the two axis I have (X,Y and rudder(R),throttle(Z)) seem to be intermixed within this one axis it returns. I have not yet tested this in my app as I was worried about this (I was verifing which axis went to which direction first). Is it just something about the command line demo and my app should work fine (I always use buffered), or is something going on considering it works perfectly elsewhere? The POV works most of the time, it only skips an event once in a while. All other inputs on the system work fine. Ideas? This is last updated about two weeks ago.