Update of /cvsroot/plib/plib/src/js
In directory sc8-pr-cvs1:/tmp/cvs-serv22678
Modified Files:
jsLinux.cxx
Log Message:
Melchior Franz's fixes for big-endian Linuxes and the new js code.
----------------------------------------------------------------------
Index: jsLinux.cxx
===================================================================
RCS file: /cvsroot/plib/plib/src/js/jsLinux.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- jsLinux.cxx 29 Nov 2002 19:39:48 -0000 1.1
+++ jsLinux.cxx 10 Apr 2003 11:47:19 -0000 1.2
@@ -51,8 +51,15 @@
Set the correct number of axes for the linux driver
*/
- ioctl ( fd, JSIOCGAXES , &num_axes ) ;
- ioctl ( fd, JSIOCGBUTTONS, &num_buttons ) ;
+ /* Melchior Franz's fixes for big-endian Linuxes since writing
+ * to the upper byte of an uninitialized word doesn't work.
+ * 9 April 2003
+ */
+ unsigned char u ;
+ ioctl ( fd, JSIOCGAXES , &u ) ;
+ num_axes = u ;
+ ioctl ( fd, JSIOCGBUTTONS, &u ) ;
+ num_buttons = u ;
ioctl ( fd, JSIOCGNAME ( sizeof(name) ), name ) ;
fcntl ( fd, F_SETFL , O_NONBLOCK ) ;
|