Re: [Plib-devel] Windows joystick problem
Brought to you by:
sjbaker
From: Frederic B. <fre...@fr...> - 2004-10-15 06:14:04
|
Frederic Bouvier a =E9crit : > Hi, > > the last change to jsWindows.cxx by /smokydiamond/ here : > http://cvs.sourceforge.net/viewcvs.py/plib/plib/src/js/jsWindows.cxx?r1= =3D1.4&r2=3D1.5=20 > > > is giving me an error when running FlightGear. I am getting tons of > messages like this : > > PLIB_JS: Wrong num_axes. Joystick input is now invalid > > indicating that the program goes line 251. This is a default case of a > switch on the number of axis and 16, which is the value of num_axes > initialized with _JS_MAX_AXES line 129, is not listed as a valid case. > > Could someone restore line 129 with its previous wording : > > num_axes =3D _JS_MAX_AXES_WIN > > or include 'case 16:' ( or 'case _JS_MAX_AXES:' ) in the switch beginin= g > line 204 Could someone apply the patch below to CVS in order to restore windows=20 joystick functionality. Thank you very much. -Fred cvs -z4 -q diff -u jsWindows.cxx (in directory=20 I:\FlightGear\cvs\plib\src\js\) Index: jsWindows.cxx =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /cvsroot/plib/plib/src/js/jsWindows.cxx,v retrieving revision 1.5 diff -u -r1.5 jsWindows.cxx --- jsWindows.cxx 21 Sep 2004 11:45:55 -0000 1.5 +++ jsWindows.cxx 7 Oct 2004 21:47:48 -0000 @@ -126,7 +126,7 @@ // X,Y,Z,R,U,V,POV - not necessarily the first n of these. if ( os->jsCaps.wCaps & JOYCAPS_HASPOV ) { - num_axes =3D _JS_MAX_AXES ; + num_axes =3D _JS_MAX_AXES_WIN ; min [ 7 ] =3D -1.0 ; max [ 7 ] =3D 1.0 ; // POV Y min [ 6 ] =3D -1.0 ; max [ 6 ] =3D 1.0 ; // POV X } |