Commit graph

35 commits

Author SHA1 Message Date
Sam Lantinga
db39b4811f Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms.
Added SDL_GameControllerRumble() and SDL_JoystickRumble() for simple force feedback outside of the SDL haptics API
2018-08-09 16:00:17 -07:00
Sam Lantinga
b81da78518 Added SDL_GameControllerMappingForDeviceIndex() to get the mapping for a controller before it's opened 2018-03-07 13:30:40 -08:00
Sam Lantinga
346af016a5 Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Sam Lantinga
1b24bfad38 Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Sam Lantinga
c47f2e6558 Added documentation for the game controller axis values 2016-12-27 09:59:36 -08:00
Sam Lantinga
7d8c7416d1 Fixed bug 3517 - Compiler warnings with gcc -Wstrict-prototypes
felix

Compiling even a simple SDL2 'hello world' program with gcc -Wstrict-prototypes (GCC 6.2.1) results in warnings like:

/usr/include/SDL2/SDL_gamecontroller.h:143:1: attention : function declaration isn't a prototype [-Wstrict-prototypes]
 extern DECLSPEC int SDLCALL SDL_GameControllerNumMappings();
 ^~~~~~

It seems there is a missing 'void' between the parentheses.
2016-12-26 02:12:21 -08:00
Sam Lantinga
a31f3d2c25 Added an API to iterate over game controller mappings 2016-11-29 06:36:57 -08:00
Sam Lantinga
91e0a1d094 Renaming of guard header names to quiet -Wreserved-id-macro
Patch contributed by Sylvain
2016-11-20 21:34:54 -08:00
Sam Lantinga
ad2c01ad94 Fixed a few warnings that show up with -Wdocumentation and -Wdocumentation-unknown-command, patch contributed by Sylvain 2016-11-20 21:26:56 -08:00
Sam Lantinga
6fcf21b827 Standardized the format of the SDL joystick GUID and added functions to retrieve the USB VID/PID from a joystick and game controller. 2016-11-10 17:19:34 -08:00
Philipp Wiesemann
9cb82d5ff2 Added brackets to function names in header comments so that doxygen links them. 2016-08-03 22:30:31 +02:00
Sam Lantinga
7ee8dda270 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Ryan C. Gordon
03cb578e6e Added SDL_JoystickFromInstanceID() and SDL_GameControllerFromInstanceID().
--HG--
extra : amend_source : 110a5505509ddb9ecafed75abd89602986a99696
2015-11-14 12:35:45 -05:00
Sam Lantinga
56b58afdbe Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Philipp Wiesemann
958b71701a Fixed SDL_GameControllerOpen() and SDL_JoystickOpen() documentation in header. 2015-04-20 20:03:40 +02:00
Ryan C. Gordon
139252cb4e Corrected documentation about triggers values in SDL_GameControllerGetAxis().
Fixes Bugzilla #2319.
2015-02-18 16:25:15 -05:00
Philipp Wiesemann
04a6052cee Corrected header file documentation comment. 2014-11-22 22:20:40 +01:00
Sam Lantinga
d7940a513e Fixed bug 2374 - Update copyright for 2014...
Is it that time already??
2014-02-02 00:53:27 -08:00
Sam Lantinga
b23701455b Added missing header for file IO 2013-12-05 09:54:22 -08:00
Gabriel Jacobo
137f4aedc1 Adds SDL_GameControllerAddMappingsFromRW, updates controllermap
SDL_GameControllerAddMappingsFromFile is now a convenience macro.

controllermap can now skip bindings by pressing space or clicking/touching the
screen.
2013-12-03 12:01:28 -03:00
Gabriel Jacobo
64ff6df0b8 Adds SDL_GameControllerAddMappingsFromFile 2013-12-02 19:34:08 -03:00
Sam Lantinga
197f525783 Added SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS to the documentation for the joystick and game controller APIs 2013-07-03 12:31:40 -07:00
Sam Lantinga
0cb6385637 File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
Philipp Wiesemann
699341597a Corrected spelling in header file. 2013-05-13 23:00:50 +02:00
Philipp Wiesemann
c0f29fb59a Corrected spelling in header files. 2013-04-27 17:52:58 +02:00
Ryan C. Gordon
7c5943b1ee Fixed a typo (thanks, Ethan!). 2013-04-10 22:18:10 -04:00
Edward Rudd
5fd98b3297 add new gamecontroller APIs
- add mappings after init (or even before w/o using the hint)
- get string for axis
- get string for button
- get mapping string for controller or for GUID
- new event to notify when a controller is remapped. (e.g. mapping was changed via the AddMapping method)
2013-03-05 17:59:36 -05:00
Sam Lantinga
2204530a1b Fixed gcc pedantic warnings in public headers 2013-02-26 20:41:28 -08:00
Ryan C. Gordon
ad1d82cf83 Added SDL_GameControllerUpdate(). 2013-02-25 01:51:21 -05:00
Ryan C. Gordon
a5862a96a3 Changed the game controller enum types to match SDL naming conventions. 2013-02-25 00:56:21 -05:00
Sam Lantinga
95dcfa4c28 Happy New Year! 2013-02-15 08:47:44 -08:00
Jørgen P. Tjernø
6fee8913ec New SDL_MSBIndex, updated VS projects, cleanup gamecontroller.
- Updated Visual Studio 2010 project with SDL 2.0 library names
- Don't use a 256 byte LUT, but rather <32 bytes of data on the stack.
- Cleanups in SDL_gamecontroller.h

--HG--
extra : amend_source : e7d1b224d1356c5be7a89df7b82a7f5e1141c167
2013-02-13 17:19:21 -08:00
Jørgen P. Tjernø
e34e953eba Check bounds in SDL_IsGameController. Switch two functions to SDL_bool.
Switches SDL_GameControllerGetAttached and SDL_IsGameController to
       return SDL_bool, instead of int.
2013-02-12 17:07:21 -08:00
Sam Lantinga
290bbdda14 Fixed bug 1653 - comma at the end of enum
Martin Gerhardy 2012-11-30 03:07:14 PST

SDL_gamecontroller.h:61:29: warning: comma at end of enumerator list [-pedantic]
2012-12-31 16:29:01 -08:00
Sam Lantinga
34b88dfaae Added hotplug joystick support and simplified game controller API, courtesy of Alfred Reynolds 2012-11-26 16:37:54 -08:00