--- /dev/null
+#include <GL/freeglut.h>
+#include "fg_internal.h"
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+
+#define JS_TRUE 1
+#define JS_FALSE 0
+
+/* External function declarations (mostly platform-specific) */
+extern void fgPlatformJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes );
+extern void fgPlatformJoystickOpen( SFG_Joystick* joy );
+extern void fgPlatformJoystickInit( SFG_Joystick *fgJoystick[], int ident );
+extern void fgPlatformJoystickClose ( int ident );
+
+#define MAX_NUM_JOYSTICKS 2
+SFG_Joystick *fgJoystick [ MAX_NUM_JOYSTICKS ];
+
+void fgPlatformJoystickRawRead( SFG_Joystick* joy, int* buttons, float* axes )
+{
+}
+
+void fgPlatformJoystickOpen( SFG_Joystick* joy )
+{
+ joy->error = GL_TRUE;
+}
+
+void fgPlatformJoystickInit( SFG_Joystick *fgJoystick[], int ident )
+{
+ fgJoystick[ ident ]->id = ident;
+ fgJoystick[ ident ]->error = GL_FALSE;
+}
+
+void fgPlatformJoystickClose ( int ident )
+{
+}
+
+void fgInitialiseJoysticks ( void )
+{
+}
+
+void fgJoystickClose( void )
+{
+}
+
+void fgJoystickPollWindow( SFG_Window* window )
+{
+}
+
+int fgJoystickDetect( void )
+{
+ return 0;
+}
+
+void FGAPIENTRY glutForceJoystickFunc( void )
+{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutForceJoystickFunc" );
+#if !defined(_WIN32_WCE)
+ freeglut_return_if_fail( fgStructure.CurrentWindow != NULL );
+ freeglut_return_if_fail( FETCH_WCB( *( fgStructure.CurrentWindow ), Joystick ) );
+ fgJoystickPollWindow( fgStructure.CurrentWindow );
+#endif /* !defined(_WIN32_WCE) */
+}
+int glutJoystickGetNumAxes( int ident )
+{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutJoystickGetNumAxes" );
+ return fgJoystick[ ident ]->num_axes;
+}
+int glutJoystickGetNumButtons( int ident )
+{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutJoystickGetNumButtons" );
+ return fgJoystick[ ident ]->num_buttons;
+}
+int glutJoystickNotWorking( int ident )
+{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutJoystickNotWorking" );
+ return fgJoystick[ ident ]->error;
+}
+
+float glutJoystickGetDeadBand( int ident, int axis )
+{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutJoystickGetDeadBand" );
+ return fgJoystick[ ident ]->dead_band [ axis ];
+}
+void glutJoystickSetDeadBand( int ident, int axis, float db )
+{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutJoystickSetDeadBand" );
+ fgJoystick[ ident ]->dead_band[ axis ] = db;
+}
+
+float glutJoystickGetSaturation( int ident, int axis )
+{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutJoystickGetSaturation" );
+ return fgJoystick[ ident ]->saturate[ axis ];
+}
+void glutJoystickSetSaturation( int ident, int axis, float st )
+{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutJoystickSetSaturation" );
+ fgJoystick[ ident ]->saturate [ axis ] = st;
+}
+
+void glutJoystickSetMinRange( int ident, float *axes )
+{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutJoystickSetMinRange" );
+ memcpy( fgJoystick[ ident ]->min, axes,
+ fgJoystick[ ident ]->num_axes * sizeof( float ) );
+}
+void glutJoystickSetMaxRange( int ident, float *axes )
+{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutJoystickSetMaxRange" );
+ memcpy( fgJoystick[ ident ]->max, axes,
+ fgJoystick[ ident ]->num_axes * sizeof( float ) );
+}
+void glutJoystickSetCenter( int ident, float *axes )
+{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutJoystickSetCenter" );
+ memcpy( fgJoystick[ ident ]->center, axes,
+ fgJoystick[ ident ]->num_axes * sizeof( float ) );
+}
+
+void glutJoystickGetMinRange( int ident, float *axes )
+{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutJoystickGetMinRange" );
+ memcpy( axes, fgJoystick[ ident ]->min,
+ fgJoystick[ ident ]->num_axes * sizeof( float ) );
+}
+void glutJoystickGetMaxRange( int ident, float *axes )
+{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutJoystickGetMaxRange" );
+ memcpy( axes, fgJoystick[ ident ]->max,
+ fgJoystick[ ident ]->num_axes * sizeof( float ) );
+}
+void glutJoystickGetCenter( int ident, float *axes )
+{
+ FREEGLUT_EXIT_IF_NOT_INITIALISED ( "glutJoystickGetCenter" );
+ memcpy( axes, fgJoystick[ ident ]->center,
+ fgJoystick[ ident ]->num_axes * sizeof( float ) );
+}
+
+/*** END OF FILE ***/