src/joystick/win32/SDL_mmjoystick.c
changeset 834 d37179d10ccc
parent 769 b8d311d90021
child 937 1e6366bde299
equal deleted inserted replaced
833:31fa08b36380 834:d37179d10ccc
    41 #define MAX_JOYSTICKS	16
    41 #define MAX_JOYSTICKS	16
    42 #define MAX_AXES	6	/* each joystick can have up to 6 axes */
    42 #define MAX_AXES	6	/* each joystick can have up to 6 axes */
    43 #define MAX_BUTTONS	32	/* and 32 buttons                      */
    43 #define MAX_BUTTONS	32	/* and 32 buttons                      */
    44 #define AXIS_MIN	-32768  /* minimum value for axis coordinate */
    44 #define AXIS_MIN	-32768  /* minimum value for axis coordinate */
    45 #define AXIS_MAX	32767   /* maximum value for axis coordinate */
    45 #define AXIS_MAX	32767   /* maximum value for axis coordinate */
    46 #define JOY_AXIS_THRESHOLD	(((AXIS_MAX)-(AXIS_MIN))/100) /* 1% motion */
    46 /* limit axis to 256 possible positions to filter out noise */
       
    47 #define JOY_AXIS_THRESHOLD      (((AXIS_MAX)-(AXIS_MIN))/256)
    47 #define JOY_BUTTON_FLAG(n)	(1<<n)
    48 #define JOY_BUTTON_FLAG(n)	(1<<n)
    48 
    49 
    49 
    50 
    50 /* array to hold joystick ID values */
    51 /* array to hold joystick ID values */
    51 static UINT	SYS_JoystickID[MAX_JOYSTICKS];
    52 static UINT	SYS_JoystickID[MAX_JOYSTICKS];