(98) src/Makefile.am:34 Added mwmborder.c
[freeglut] / freeglut-1.3 / freeglut_joystick.c
index bc3df83..a47d491 100644 (file)
@@ -408,12 +408,12 @@ static void fghJoystickOpen( SFG_Joystick* joy )
         return;
 
 #   ifdef __FreeBSD__
-    fghJoystickRawRead( buttons, axes );
+    fghJoystickRawRead(joy, buttons, axes );
     joy->error = axes[ 0 ] < -1000000000.0f;
     if( joy->error )
       return ;
 
-    sprintf( joyfname, "%s/.joy%drc", g_getenv( "HOME" ), id );
+    sprintf( joyfname, "%s/.joy%drc", g_getenv( "HOME" ), joy->id );
 
     joyfile = fopen( joyfname, "r" );
     joy->error = (joyfile == NULL);
@@ -434,8 +434,8 @@ static void fghJoystickOpen( SFG_Joystick* joy )
 
     for( i=0 ; i<_JS_MAX_AXES ; i++ )
     {
-        dead_band[ i ] = 0.0f;
-        saturate [ i ] = 1.0f;
+        joy->dead_band[ i ] = 0.0f;
+        joy->saturate [ i ] = 1.0f;
     }
 #   else
 
@@ -462,7 +462,7 @@ static void fghJoystickOpen( SFG_Joystick* joy )
 
     do
     { 
-        fghJoystickRawRead( joy, NULL, joy->center )
+        fghJoystickRawRead( joy, NULL, joy->center );
         counter++;
     } while( !joy->error && counter < 100 && joy->center[ 0 ] == 512.0f && joy->center[ 1 ] == 512.0f );
    
@@ -540,7 +540,7 @@ void fgJoystickClose( void )
 #endif
 
     free ( fgJoystick ) ;
-    fgJoystick = NULL ;  // show joystick has been deinitialized
+    fgJoystick = NULL ;  /* show joystick has been deinitialized */
 }
 
 /*