X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FInput%2Fjs_demo.cxx;h=189dd3d239f903b87892d3d6b3cdb40cec6f91c7;hb=11d15b451347674fba77648700d23c5aaec3c6c2;hp=904a4097d02eda65fca96f1a4c40b2166f899e3e;hpb=9124dd945d9142b667839761f57075d07e4d1585;p=flightgear.git diff --git a/src/Input/js_demo.cxx b/src/Input/js_demo.cxx index 904a4097d..189dd3d23 100644 --- a/src/Input/js_demo.cxx +++ b/src/Input/js_demo.cxx @@ -17,6 +17,8 @@ int main ( int, char ** ) float *ax[Z] ; int i, j, t, useful[Z]; + jsInit(); + for ( i = 0; i < Z; i++ ) js[i] = new jsJoystick ( i ) ; @@ -26,9 +28,10 @@ int main ( int, char ** ) t = 0; for ( i = 0; i < Z; i++ ) { useful[i] = ! ( js[i]->notWorking () ); - if ( useful[i] ) + if ( useful[i] ) { t++; - else printf ( "Joystick %i not detected\n", i ) ; + printf ( "Joystick %i: \"%s\"\n", i, js[i]->getName() ) ; + } else printf ( "Joystick %i not detected\n", i ) ; } if ( t == 0 ) exit ( 1 ) ;