136 /** |
136 /** |
137 * @name Hat Positions |
137 * @name Hat Positions |
138 * The return value of SDL_JoystickGetHat() is one of the following positions: |
138 * The return value of SDL_JoystickGetHat() is one of the following positions: |
139 */ |
139 */ |
140 /*@{*/ |
140 /*@{*/ |
141 #define SDL_HAT_CENTERED 0x00 |
141 #define SDL_HAT_CENTERED 0x00 |
142 #define SDL_HAT_UP 0x01 |
142 #define SDL_HAT_UP 0x01 |
143 #define SDL_HAT_RIGHT 0x02 |
143 #define SDL_HAT_RIGHT 0x02 |
144 #define SDL_HAT_DOWN 0x04 |
144 #define SDL_HAT_DOWN 0x04 |
145 #define SDL_HAT_LEFT 0x08 |
145 #define SDL_HAT_LEFT 0x08 |
146 #define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP) |
146 #define SDL_HAT_RIGHTUP (SDL_HAT_RIGHT|SDL_HAT_UP) |
147 #define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN) |
147 #define SDL_HAT_RIGHTDOWN (SDL_HAT_RIGHT|SDL_HAT_DOWN) |
148 #define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP) |
148 #define SDL_HAT_LEFTUP (SDL_HAT_LEFT|SDL_HAT_UP) |
149 #define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN) |
149 #define SDL_HAT_LEFTDOWN (SDL_HAT_LEFT|SDL_HAT_DOWN) |
150 /*@}*/ |
150 /*@}*/ |
151 |
151 |
152 /** |
152 /** |
153 * Get the current state of a POV hat on a joystick |
153 * Get the current state of a POV hat on a joystick |
154 * |
154 * |
155 * @param[in] hat The hat indices start at index 0. |
155 * @param[in] hat The hat indices start at index 0. |
156 */ |
156 */ |
157 extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick, int hat); |
157 extern DECLSPEC Uint8 SDLCALL SDL_JoystickGetHat(SDL_Joystick *joystick, int hat); |