Mercurial > sdl-ios-xcode
comparison src/joystick/dummy/SDL_sysjoystick.c @ 1668:4da1ee79c9af SDL-1.3
more tweaking indent options
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 29 May 2006 04:04:35 +0000 |
parents | 782fd950bd46 |
children |
comparison
equal
deleted
inserted
replaced
1667:1fddae038bc8 | 1668:4da1ee79c9af |
---|---|
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 | 37 int |
38 SDL_SYS_JoystickInit (void) | 38 SDL_SYS_JoystickInit(void) |
39 { | 39 { |
40 SDL_numjoysticks = 0; | 40 SDL_numjoysticks = 0; |
41 return (0); | 41 return (0); |
42 } | 42 } |
43 | 43 |
44 /* Function to get the device-dependent name of a joystick */ | 44 /* Function to get the device-dependent name of a joystick */ |
45 const char * | 45 const char * |
46 SDL_SYS_JoystickName (int index) | 46 SDL_SYS_JoystickName(int index) |
47 { | 47 { |
48 SDL_SetError ("Logic error: No joysticks available"); | 48 SDL_SetError("Logic error: No joysticks available"); |
49 return (NULL); | 49 return (NULL); |
50 } | 50 } |
51 | 51 |
52 /* Function to open a joystick for use. | 52 /* Function to open a joystick for use. |
53 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. |
54 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. |
55 It returns 0, or -1 if there is an error. | 55 It returns 0, or -1 if there is an error. |
56 */ | 56 */ |
57 int | 57 int |
58 SDL_SYS_JoystickOpen (SDL_Joystick * joystick) | 58 SDL_SYS_JoystickOpen(SDL_Joystick * joystick) |
59 { | 59 { |
60 SDL_SetError ("Logic error: No joysticks available"); | 60 SDL_SetError("Logic error: No joysticks available"); |
61 return (-1); | 61 return (-1); |
62 } | 62 } |
63 | 63 |
64 /* 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. |
65 * This function shouldn't update the joystick structure directly, | 65 * This function shouldn't update the joystick structure directly, |
66 * but instead should call SDL_PrivateJoystick*() to deliver events | 66 * but instead should call SDL_PrivateJoystick*() to deliver events |
67 * and update joystick device state. | 67 * and update joystick device state. |
68 */ | 68 */ |
69 void | 69 void |
70 SDL_SYS_JoystickUpdate (SDL_Joystick * joystick) | 70 SDL_SYS_JoystickUpdate(SDL_Joystick * joystick) |
71 { | 71 { |
72 return; | 72 return; |
73 } | 73 } |
74 | 74 |
75 /* Function to close a joystick after use */ | 75 /* Function to close a joystick after use */ |
76 void | 76 void |
77 SDL_SYS_JoystickClose (SDL_Joystick * joystick) | 77 SDL_SYS_JoystickClose(SDL_Joystick * joystick) |
78 { | 78 { |
79 return; | 79 return; |
80 } | 80 } |
81 | 81 |
82 /* Function to perform any system-specific joystick related cleanup */ | 82 /* Function to perform any system-specific joystick related cleanup */ |
83 void | 83 void |
84 SDL_SYS_JoystickQuit (void) | 84 SDL_SYS_JoystickQuit(void) |
85 { | 85 { |
86 return; | 86 return; |
87 } | 87 } |
88 | 88 |
89 #endif /* SDL_JOYSTICK_DUMMY || SDL_JOYSTICK_DISABLED */ | 89 #endif /* SDL_JOYSTICK_DUMMY || SDL_JOYSTICK_DISABLED */ |