[Plib-cvs] plib/examples/src/js js_demo.cxx,1.2,1.3
Brought to you by:
sjbaker
From: <ud...@us...> - 2002-04-17 22:29:56
|
Update of /cvsroot/plib/plib/examples/src/js In directory usw-pr-cvs1:/tmp/cvs-serv2591/examples/src/js Modified Files: js_demo.cxx Log Message: David Megginson: Added jsJoystick::getName () Index: js_demo.cxx =================================================================== RCS file: /cvsroot/plib/plib/examples/src/js/js_demo.cxx,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- js_demo.cxx 13 Jul 2000 05:57:54 -0000 1.2 +++ js_demo.cxx 17 Apr 2002 22:29:51 -0000 1.3 @@ -12,8 +12,16 @@ printf ( "Joystick test program.\n" ) ; printf ( "~~~~~~~~~~~~~~~~~~~~~~\n" ) ; - if ( js[0]->notWorking () ) printf ( "Joystick 0 not detected\n" ) ; - if ( js[1]->notWorking () ) printf ( "Joystick 1 not detected\n" ) ; + if ( js[0]->notWorking () ) + printf ( "Joystick 0 not detected\n" ) ; + else + printf ( "Joystick 0 is \"%s\"\n", js[0]->getName() ) ; + + if ( js[1]->notWorking () ) + printf ( "Joystick 1 not detected\n" ) ; + else + printf ( "Joystick 1 is \"%s\"\n", js[1]->getName() ) ; + if ( js[0]->notWorking () && js[1]->notWorking () ) exit ( 1 ) ; ax[0] = new float [ js[0]->getNumAxes () ] ; |