SDL_gamecontroller.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542
  1. /*
  2. Simple DirectMedia Layer
  3. Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  4. This software is provided 'as-is', without any express or implied
  5. warranty. In no event will the authors be held liable for any damages
  6. arising from the use of this software.
  7. Permission is granted to anyone to use this software for any purpose,
  8. including commercial applications, and to alter it and redistribute it
  9. freely, subject to the following restrictions:
  10. 1. The origin of this software must not be misrepresented; you must not
  11. claim that you wrote the original software. If you use this software
  12. in a product, an acknowledgment in the product documentation would be
  13. appreciated but is not required.
  14. 2. Altered source versions must be plainly marked as such, and must not be
  15. misrepresented as being the original software.
  16. 3. This notice may not be removed or altered from any source distribution.
  17. */
  18. /**
  19. * \file SDL_gamecontroller.h
  20. *
  21. * Include file for SDL game controller event handling
  22. */
  23. #ifndef SDL_gamecontroller_h_
  24. #define SDL_gamecontroller_h_
  25. #include "SDL_stdinc.h"
  26. #include "SDL_error.h"
  27. #include "SDL_rwops.h"
  28. #include "SDL_sensor.h"
  29. #include "SDL_joystick.h"
  30. #include "begin_code.h"
  31. /* Set up for C function definitions, even when using C++ */
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35. /**
  36. * \file SDL_gamecontroller.h
  37. *
  38. * In order to use these functions, SDL_Init() must have been called
  39. * with the ::SDL_INIT_GAMECONTROLLER flag. This causes SDL to scan the system
  40. * for game controllers, and load appropriate drivers.
  41. *
  42. * If you would like to receive controller updates while the application
  43. * is in the background, you should set the following hint before calling
  44. * SDL_Init(): SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS
  45. */
  46. /**
  47. * The gamecontroller structure used to identify an SDL game controller
  48. */
  49. struct _SDL_GameController;
  50. typedef struct _SDL_GameController SDL_GameController;
  51. typedef enum
  52. {
  53. SDL_CONTROLLER_TYPE_UNKNOWN = 0,
  54. SDL_CONTROLLER_TYPE_XBOX360,
  55. SDL_CONTROLLER_TYPE_XBOXONE,
  56. SDL_CONTROLLER_TYPE_PS3,
  57. SDL_CONTROLLER_TYPE_PS4,
  58. SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO,
  59. SDL_CONTROLLER_TYPE_VIRTUAL,
  60. SDL_CONTROLLER_TYPE_PS5
  61. } SDL_GameControllerType;
  62. typedef enum
  63. {
  64. SDL_CONTROLLER_BINDTYPE_NONE = 0,
  65. SDL_CONTROLLER_BINDTYPE_BUTTON,
  66. SDL_CONTROLLER_BINDTYPE_AXIS,
  67. SDL_CONTROLLER_BINDTYPE_HAT
  68. } SDL_GameControllerBindType;
  69. /**
  70. * Get the SDL joystick layer binding for this controller button/axis mapping
  71. */
  72. typedef struct SDL_GameControllerButtonBind
  73. {
  74. SDL_GameControllerBindType bindType;
  75. union
  76. {
  77. int button;
  78. int axis;
  79. struct {
  80. int hat;
  81. int hat_mask;
  82. } hat;
  83. } value;
  84. } SDL_GameControllerButtonBind;
  85. /**
  86. * To count the number of game controllers in the system for the following:
  87. * int nJoysticks = SDL_NumJoysticks();
  88. * int nGameControllers = 0;
  89. * for (int i = 0; i < nJoysticks; i++) {
  90. * if (SDL_IsGameController(i)) {
  91. * nGameControllers++;
  92. * }
  93. * }
  94. *
  95. * Using the SDL_HINT_GAMECONTROLLERCONFIG hint or the SDL_GameControllerAddMapping() you can add support for controllers SDL is unaware of or cause an existing controller to have a different binding. The format is:
  96. * guid,name,mappings
  97. *
  98. * Where GUID is the string value from SDL_JoystickGetGUIDString(), name is the human readable string for the device and mappings are controller mappings to joystick ones.
  99. * Under Windows there is a reserved GUID of "xinput" that covers any XInput devices.
  100. * The mapping format for joystick is:
  101. * bX - a joystick button, index X
  102. * hX.Y - hat X with value Y
  103. * aX - axis X of the joystick
  104. * Buttons can be used as a controller axis and vice versa.
  105. *
  106. * This string shows an example of a valid mapping for a controller
  107. * "03000000341a00003608000000000000,PS3 Controller,a:b1,b:b2,y:b3,x:b0,start:b9,guide:b12,back:b8,dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftshoulder:b4,rightshoulder:b5,leftstick:b10,rightstick:b11,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b6,righttrigger:b7",
  108. *
  109. */
  110. /**
  111. * Load a set of mappings from a seekable SDL data stream (memory or file), filtered by the current SDL_GetPlatform()
  112. * A community sourced database of controllers is available at https://raw.github.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt
  113. *
  114. * If \c freerw is non-zero, the stream will be closed after being read.
  115. *
  116. * \return number of mappings added, -1 on error
  117. */
  118. extern DECLSPEC int SDLCALL SDL_GameControllerAddMappingsFromRW(SDL_RWops * rw, int freerw);
  119. /**
  120. * Load a set of mappings from a file, filtered by the current SDL_GetPlatform()
  121. *
  122. * Convenience macro.
  123. */
  124. #define SDL_GameControllerAddMappingsFromFile(file) SDL_GameControllerAddMappingsFromRW(SDL_RWFromFile(file, "rb"), 1)
  125. /**
  126. * Add or update an existing mapping configuration
  127. *
  128. * \return 1 if mapping is added, 0 if updated, -1 on error
  129. */
  130. extern DECLSPEC int SDLCALL SDL_GameControllerAddMapping(const char* mappingString);
  131. /**
  132. * Get the number of mappings installed
  133. *
  134. * \return the number of mappings
  135. */
  136. extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings(void);
  137. /**
  138. * Get the mapping at a particular index.
  139. *
  140. * \return the mapping string. Must be freed with SDL_free(). Returns NULL if the index is out of range.
  141. */
  142. extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForIndex(int mapping_index);
  143. /**
  144. * Get a mapping string for a GUID
  145. *
  146. * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
  147. */
  148. extern DECLSPEC char * SDLCALL SDL_GameControllerMappingForGUID(SDL_JoystickGUID guid);
  149. /**
  150. * Get a mapping string for an open GameController
  151. *
  152. * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
  153. */
  154. extern DECLSPEC char * SDLCALL SDL_GameControllerMapping(SDL_GameController *gamecontroller);
  155. /**
  156. * Is the joystick on this index supported by the game controller interface?
  157. */
  158. extern DECLSPEC SDL_bool SDLCALL SDL_IsGameController(int joystick_index);
  159. /**
  160. * Get the implementation dependent name of a game controller.
  161. * This can be called before any controllers are opened.
  162. * If no name can be found, this function returns NULL.
  163. */
  164. extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
  165. /**
  166. * Get the type of a game controller.
  167. * This can be called before any controllers are opened.
  168. */
  169. extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerTypeForIndex(int joystick_index);
  170. /**
  171. * Get the mapping of a game controller.
  172. * This can be called before any controllers are opened.
  173. *
  174. * \return the mapping string. Must be freed with SDL_free(). Returns NULL if no mapping is available
  175. */
  176. extern DECLSPEC char *SDLCALL SDL_GameControllerMappingForDeviceIndex(int joystick_index);
  177. /**
  178. * Open a game controller for use.
  179. * The index passed as an argument refers to the N'th game controller on the system.
  180. * This index is not the value which will identify this controller in future
  181. * controller events. The joystick's instance id (::SDL_JoystickID) will be
  182. * used there instead.
  183. *
  184. * \return A controller identifier, or NULL if an error occurred.
  185. */
  186. extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_index);
  187. /**
  188. * Return the SDL_GameController associated with an instance id.
  189. */
  190. extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid);
  191. /**
  192. * Return the SDL_GameController associated with a player index.
  193. */
  194. extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromPlayerIndex(int player_index);
  195. /**
  196. * Return the name for this currently opened controller
  197. */
  198. extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
  199. /**
  200. * Return the type of this currently opened controller
  201. */
  202. extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_GameController *gamecontroller);
  203. /**
  204. * Get the player index of an opened game controller, or -1 if it's not available
  205. *
  206. * For XInput controllers this returns the XInput user index.
  207. */
  208. extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
  209. /**
  210. * Set the player index of an opened game controller
  211. */
  212. extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index);
  213. /**
  214. * Get the USB vendor ID of an opened controller, if available.
  215. * If the vendor ID isn't available this function returns 0.
  216. */
  217. extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetVendor(SDL_GameController *gamecontroller);
  218. /**
  219. * Get the USB product ID of an opened controller, if available.
  220. * If the product ID isn't available this function returns 0.
  221. */
  222. extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProduct(SDL_GameController *gamecontroller);
  223. /**
  224. * Get the product version of an opened controller, if available.
  225. * If the product version isn't available this function returns 0.
  226. */
  227. extern DECLSPEC Uint16 SDLCALL SDL_GameControllerGetProductVersion(SDL_GameController *gamecontroller);
  228. /**
  229. * Get the serial number of an opened controller, if available.
  230. *
  231. * Returns the serial number of the controller, or NULL if it is not available.
  232. */
  233. extern DECLSPEC const char * SDLCALL SDL_GameControllerGetSerial(SDL_GameController *gamecontroller);
  234. /**
  235. * Returns SDL_TRUE if the controller has been opened and currently connected,
  236. * or SDL_FALSE if it has not.
  237. */
  238. extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerGetAttached(SDL_GameController *gamecontroller);
  239. /**
  240. * Get the underlying joystick object used by a controller
  241. */
  242. extern DECLSPEC SDL_Joystick *SDLCALL SDL_GameControllerGetJoystick(SDL_GameController *gamecontroller);
  243. /**
  244. * Enable/disable controller event polling.
  245. *
  246. * If controller events are disabled, you must call SDL_GameControllerUpdate()
  247. * yourself and check the state of the controller when you want controller
  248. * information.
  249. *
  250. * The state can be one of ::SDL_QUERY, ::SDL_ENABLE or ::SDL_IGNORE.
  251. */
  252. extern DECLSPEC int SDLCALL SDL_GameControllerEventState(int state);
  253. /**
  254. * Update the current state of the open game controllers.
  255. *
  256. * This is called automatically by the event loop if any game controller
  257. * events are enabled.
  258. */
  259. extern DECLSPEC void SDLCALL SDL_GameControllerUpdate(void);
  260. /**
  261. * The list of axes available from a controller
  262. *
  263. * Thumbstick axis values range from SDL_JOYSTICK_AXIS_MIN to SDL_JOYSTICK_AXIS_MAX,
  264. * and are centered within ~8000 of zero, though advanced UI will allow users to set
  265. * or autodetect the dead zone, which varies between controllers.
  266. *
  267. * Trigger axis values range from 0 to SDL_JOYSTICK_AXIS_MAX.
  268. */
  269. typedef enum
  270. {
  271. SDL_CONTROLLER_AXIS_INVALID = -1,
  272. SDL_CONTROLLER_AXIS_LEFTX,
  273. SDL_CONTROLLER_AXIS_LEFTY,
  274. SDL_CONTROLLER_AXIS_RIGHTX,
  275. SDL_CONTROLLER_AXIS_RIGHTY,
  276. SDL_CONTROLLER_AXIS_TRIGGERLEFT,
  277. SDL_CONTROLLER_AXIS_TRIGGERRIGHT,
  278. SDL_CONTROLLER_AXIS_MAX
  279. } SDL_GameControllerAxis;
  280. /**
  281. * turn this string into a axis mapping
  282. */
  283. extern DECLSPEC SDL_GameControllerAxis SDLCALL SDL_GameControllerGetAxisFromString(const char *pchString);
  284. /**
  285. * turn this axis enum into a string mapping
  286. */
  287. extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForAxis(SDL_GameControllerAxis axis);
  288. /**
  289. * Get the SDL joystick layer binding for this controller button mapping
  290. */
  291. extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
  292. SDL_GameControllerGetBindForAxis(SDL_GameController *gamecontroller,
  293. SDL_GameControllerAxis axis);
  294. /**
  295. * Return whether a game controller has a given axis
  296. */
  297. extern DECLSPEC SDL_bool SDLCALL
  298. SDL_GameControllerHasAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
  299. /**
  300. * Get the current state of an axis control on a game controller.
  301. *
  302. * The state is a value ranging from -32768 to 32767 (except for the triggers,
  303. * which range from 0 to 32767).
  304. *
  305. * The axis indices start at index 0.
  306. */
  307. extern DECLSPEC Sint16 SDLCALL
  308. SDL_GameControllerGetAxis(SDL_GameController *gamecontroller, SDL_GameControllerAxis axis);
  309. /**
  310. * The list of buttons available from a controller
  311. */
  312. typedef enum
  313. {
  314. SDL_CONTROLLER_BUTTON_INVALID = -1,
  315. SDL_CONTROLLER_BUTTON_A,
  316. SDL_CONTROLLER_BUTTON_B,
  317. SDL_CONTROLLER_BUTTON_X,
  318. SDL_CONTROLLER_BUTTON_Y,
  319. SDL_CONTROLLER_BUTTON_BACK,
  320. SDL_CONTROLLER_BUTTON_GUIDE,
  321. SDL_CONTROLLER_BUTTON_START,
  322. SDL_CONTROLLER_BUTTON_LEFTSTICK,
  323. SDL_CONTROLLER_BUTTON_RIGHTSTICK,
  324. SDL_CONTROLLER_BUTTON_LEFTSHOULDER,
  325. SDL_CONTROLLER_BUTTON_RIGHTSHOULDER,
  326. SDL_CONTROLLER_BUTTON_DPAD_UP,
  327. SDL_CONTROLLER_BUTTON_DPAD_DOWN,
  328. SDL_CONTROLLER_BUTTON_DPAD_LEFT,
  329. SDL_CONTROLLER_BUTTON_DPAD_RIGHT,
  330. SDL_CONTROLLER_BUTTON_MISC1, /* Xbox Series X share button, PS5 microphone button, Nintendo Switch Pro capture button */
  331. SDL_CONTROLLER_BUTTON_PADDLE1, /* Xbox Elite paddle P1 */
  332. SDL_CONTROLLER_BUTTON_PADDLE2, /* Xbox Elite paddle P3 */
  333. SDL_CONTROLLER_BUTTON_PADDLE3, /* Xbox Elite paddle P2 */
  334. SDL_CONTROLLER_BUTTON_PADDLE4, /* Xbox Elite paddle P4 */
  335. SDL_CONTROLLER_BUTTON_TOUCHPAD, /* PS4/PS5 touchpad button */
  336. SDL_CONTROLLER_BUTTON_MAX
  337. } SDL_GameControllerButton;
  338. /**
  339. * turn this string into a button mapping
  340. */
  341. extern DECLSPEC SDL_GameControllerButton SDLCALL SDL_GameControllerGetButtonFromString(const char *pchString);
  342. /**
  343. * turn this button enum into a string mapping
  344. */
  345. extern DECLSPEC const char* SDLCALL SDL_GameControllerGetStringForButton(SDL_GameControllerButton button);
  346. /**
  347. * Get the SDL joystick layer binding for this controller button mapping
  348. */
  349. extern DECLSPEC SDL_GameControllerButtonBind SDLCALL
  350. SDL_GameControllerGetBindForButton(SDL_GameController *gamecontroller,
  351. SDL_GameControllerButton button);
  352. /**
  353. * Return whether a game controller has a given button
  354. */
  355. extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasButton(SDL_GameController *gamecontroller,
  356. SDL_GameControllerButton button);
  357. /**
  358. * Get the current state of a button on a game controller.
  359. *
  360. * The button indices start at index 0.
  361. */
  362. extern DECLSPEC Uint8 SDLCALL SDL_GameControllerGetButton(SDL_GameController *gamecontroller,
  363. SDL_GameControllerButton button);
  364. /**
  365. * Get the number of touchpads on a game controller.
  366. */
  367. extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpads(SDL_GameController *gamecontroller);
  368. /**
  369. * Get the number of supported simultaneous fingers on a touchpad on a game controller.
  370. */
  371. extern DECLSPEC int SDLCALL SDL_GameControllerGetNumTouchpadFingers(SDL_GameController *gamecontroller, int touchpad);
  372. /**
  373. * Get the current state of a finger on a touchpad on a game controller.
  374. */
  375. extern DECLSPEC int SDLCALL SDL_GameControllerGetTouchpadFinger(SDL_GameController *gamecontroller, int touchpad, int finger, Uint8 *state, float *x, float *y, float *pressure);
  376. /**
  377. * Return whether a game controller has a particular sensor.
  378. *
  379. * \param gamecontroller The controller to query
  380. * \param type The type of sensor to query
  381. *
  382. * \return SDL_TRUE if the sensor exists, SDL_FALSE otherwise.
  383. */
  384. extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasSensor(SDL_GameController *gamecontroller, SDL_SensorType type);
  385. /**
  386. * Set whether data reporting for a game controller sensor is enabled
  387. *
  388. * \param gamecontroller The controller to update
  389. * \param type The type of sensor to enable/disable
  390. * \param enabled Whether data reporting should be enabled
  391. *
  392. * \return 0 or -1 if an error occurred.
  393. */
  394. extern DECLSPEC int SDLCALL SDL_GameControllerSetSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type, SDL_bool enabled);
  395. /**
  396. * Query whether sensor data reporting is enabled for a game controller
  397. *
  398. * \param gamecontroller The controller to query
  399. * \param type The type of sensor to query
  400. *
  401. * \return SDL_TRUE if the sensor is enabled, SDL_FALSE otherwise.
  402. */
  403. extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerIsSensorEnabled(SDL_GameController *gamecontroller, SDL_SensorType type);
  404. /**
  405. * Get the current state of a game controller sensor.
  406. *
  407. * The number of values and interpretation of the data is sensor dependent.
  408. * See SDL_sensor.h for the details for each type of sensor.
  409. *
  410. * \param gamecontroller The controller to query
  411. * \param type The type of sensor to query
  412. * \param data A pointer filled with the current sensor state
  413. * \param num_values The number of values to write to data
  414. *
  415. * \return 0 or -1 if an error occurred.
  416. */
  417. extern DECLSPEC int SDLCALL SDL_GameControllerGetSensorData(SDL_GameController *gamecontroller, SDL_SensorType type, float *data, int num_values);
  418. /**
  419. * Start a rumble effect
  420. * Each call to this function cancels any previous rumble effect, and calling it with 0 intensity stops any rumbling.
  421. *
  422. * \param gamecontroller The controller to vibrate
  423. * \param low_frequency_rumble The intensity of the low frequency (left) rumble motor, from 0 to 0xFFFF
  424. * \param high_frequency_rumble The intensity of the high frequency (right) rumble motor, from 0 to 0xFFFF
  425. * \param duration_ms The duration of the rumble effect, in milliseconds
  426. *
  427. * \return 0, or -1 if rumble isn't supported on this controller
  428. */
  429. extern DECLSPEC int SDLCALL SDL_GameControllerRumble(SDL_GameController *gamecontroller, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble, Uint32 duration_ms);
  430. /**
  431. * Start a rumble effect in the game controller's triggers
  432. * Each call to this function cancels any previous trigger rumble effect, and calling it with 0 intensity stops any rumbling.
  433. *
  434. * \param gamecontroller The controller to vibrate
  435. * \param left_rumble The intensity of the left trigger rumble motor, from 0 to 0xFFFF
  436. * \param right_rumble The intensity of the right trigger rumble motor, from 0 to 0xFFFF
  437. * \param duration_ms The duration of the rumble effect, in milliseconds
  438. *
  439. * \return 0, or -1 if rumble isn't supported on this controller
  440. */
  441. extern DECLSPEC int SDLCALL SDL_GameControllerRumbleTriggers(SDL_GameController *gamecontroller, Uint16 left_rumble, Uint16 right_rumble, Uint32 duration_ms);
  442. /**
  443. * Return whether a controller has an LED
  444. *
  445. * \param gamecontroller The controller to query
  446. *
  447. * \return SDL_TRUE, or SDL_FALSE if this controller does not have a modifiable LED
  448. */
  449. extern DECLSPEC SDL_bool SDLCALL SDL_GameControllerHasLED(SDL_GameController *gamecontroller);
  450. /**
  451. * Update a controller's LED color.
  452. *
  453. * \param gamecontroller The controller to update
  454. * \param red The intensity of the red LED
  455. * \param green The intensity of the green LED
  456. * \param blue The intensity of the blue LED
  457. *
  458. * \return 0, or -1 if this controller does not have a modifiable LED
  459. */
  460. extern DECLSPEC int SDLCALL SDL_GameControllerSetLED(SDL_GameController *gamecontroller, Uint8 red, Uint8 green, Uint8 blue);
  461. /**
  462. * Close a controller previously opened with SDL_GameControllerOpen().
  463. */
  464. extern DECLSPEC void SDLCALL SDL_GameControllerClose(SDL_GameController *gamecontroller);
  465. /* Ends C function definitions when using C++ */
  466. #ifdef __cplusplus
  467. }
  468. #endif
  469. #include "close_code.h"
  470. #endif /* SDL_gamecontroller_h_ */
  471. /* vi: set ts=4 sw=4 expandtab: */