src/joystick/dummy/SDL_sysjoystick.c
branchSDL-1.3
changeset 1662 782fd950bd46
parent 1635 92947e3a18db
child 1668 4da1ee79c9af
equal deleted inserted replaced
1661:281d3f4870e5 1662:782fd950bd46
    32 /* Function to scan the system for joysticks.
    32 /* Function to scan the system for joysticks.
    33  * This function should set SDL_numjoysticks to the number of available
    33  * This function should set SDL_numjoysticks to the number of available
    34  * joysticks.  Joystick 0 should be the system default joystick.
    34  * joysticks.  Joystick 0 should be the system default joystick.
    35  * It should return 0, or -1 on an unrecoverable fatal error.
    35  * It should return 0, or -1 on an unrecoverable fatal error.
    36  */
    36  */
    37 int SDL_SYS_JoystickInit(void)
    37 int
       
    38 SDL_SYS_JoystickInit (void)
    38 {
    39 {
    39 	SDL_numjoysticks = 0;
    40     SDL_numjoysticks = 0;
    40 	return(0);
    41     return (0);
    41 }
    42 }
    42 
    43 
    43 /* Function to get the device-dependent name of a joystick */
    44 /* Function to get the device-dependent name of a joystick */
    44 const char *SDL_SYS_JoystickName(int index)
    45 const char *
       
    46 SDL_SYS_JoystickName (int index)
    45 {
    47 {
    46 	SDL_SetError("Logic error: No joysticks available");
    48     SDL_SetError ("Logic error: No joysticks available");
    47 	return(NULL);
    49     return (NULL);
    48 }
    50 }
    49 
    51 
    50 /* Function to open a joystick for use.
    52 /* Function to open a joystick for use.
    51    The joystick to open is specified by the index field of the joystick.
    53    The joystick to open is specified by the index field of the joystick.
    52    This should fill the nbuttons and naxes fields of the joystick structure.
    54    This should fill the nbuttons and naxes fields of the joystick structure.
    53    It returns 0, or -1 if there is an error.
    55    It returns 0, or -1 if there is an error.
    54  */
    56  */
    55 int SDL_SYS_JoystickOpen(SDL_Joystick *joystick)
    57 int
       
    58 SDL_SYS_JoystickOpen (SDL_Joystick * joystick)
    56 {
    59 {
    57 	SDL_SetError("Logic error: No joysticks available");
    60     SDL_SetError ("Logic error: No joysticks available");
    58 	return(-1);
    61     return (-1);
    59 }
    62 }
    60 
    63 
    61 /* Function to update the state of a joystick - called as a device poll.
    64 /* Function to update the state of a joystick - called as a device poll.
    62  * This function shouldn't update the joystick structure directly,
    65  * This function shouldn't update the joystick structure directly,
    63  * but instead should call SDL_PrivateJoystick*() to deliver events
    66  * but instead should call SDL_PrivateJoystick*() to deliver events
    64  * and update joystick device state.
    67  * and update joystick device state.
    65  */
    68  */
    66 void SDL_SYS_JoystickUpdate(SDL_Joystick *joystick)
    69 void
       
    70 SDL_SYS_JoystickUpdate (SDL_Joystick * joystick)
    67 {
    71 {
    68 	return;
    72     return;
    69 }
    73 }
    70 
    74 
    71 /* Function to close a joystick after use */
    75 /* Function to close a joystick after use */
    72 void SDL_SYS_JoystickClose(SDL_Joystick *joystick)
    76 void
       
    77 SDL_SYS_JoystickClose (SDL_Joystick * joystick)
    73 {
    78 {
    74 	return;
    79     return;
    75 }
    80 }
    76 
    81 
    77 /* Function to perform any system-specific joystick related cleanup */
    82 /* Function to perform any system-specific joystick related cleanup */
    78 void SDL_SYS_JoystickQuit(void)
    83 void
       
    84 SDL_SYS_JoystickQuit (void)
    79 {
    85 {
    80 	return;
    86     return;
    81 }
    87 }
    82 
    88 
    83 #endif /* SDL_JOYSTICK_DUMMY || SDL_JOYSTICK_DISABLED */
    89 #endif /* SDL_JOYSTICK_DUMMY || SDL_JOYSTICK_DISABLED */
       
    90 /* vi: set ts=4 sw=4 expandtab: */