Sam Lantinga
91cad4e8ea
Fixed compiler warning
2019-01-20 13:53:16 -08:00
Sylvain Becker
1f0f29edc1
Fixed bug 4024 - remove trailing comma of Controller mappings
...
because it reports an error "Unexpected controller element"
2019-01-16 14:03:35 +01:00
Sam Lantinga
af32a2f4cd
Updated copyright for 2019
2019-01-04 22:01:14 -08:00
Sam Lantinga
7fc7e354fd
Handle both "Sony Interactive Intertainment" and "Sony Computer Entertainment" when ignoring motion sensors
2018-12-11 19:50:58 -08:00
Sam Lantinga
2ade6d2e8f
Added the hint SDL_HINT_GAMECONTROLLERCONFIG_FILE to specify a file to load at initialization containing SDL game controller mappings
2018-12-07 12:02:08 -08:00
Sam Lantinga
4011395e4a
Fixed the PS4 motion controls showing up as a separate game controller on Linux
2018-12-04 14:21:29 -08:00
Ryan C. Gordon
9f99a9c642
Merge SDL-ryan-batching-renderer branch to default.
...
--HG--
extra : rebase_source : 83b86d35497a01be6f48055490580bbba19ccc7a
extra : amend_source : faae1a04859499ede43aba3ba50fc4f62b5afbcb
2018-10-31 15:03:41 -04:00
Sam Lantinga
678ba78382
Generalized the XInput user index into a player index
2018-10-25 16:53:14 -07:00
Ryan C. Gordon
637cfa5d6b
Small stack allocations fall back to malloc if they're unexpectedly large.
...
--HG--
branch : SDL-ryan-batching-renderer
2018-10-22 20:50:32 -04:00
Sam Lantinga
303054db9e
Don't overwrite the default binding when changing the binding for a controller that was using the default.
2018-09-05 12:16:01 -07:00
Sam Lantinga
61000206da
Fixed updating bindings for controllers using the wildcard mappings
2018-10-04 15:23:42 -07:00
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
f65bdeb358
Fixed whitespace
2018-09-24 11:49:25 -07:00
Sam Lantinga
46e033920e
Fixed creating an Android game controller mapping for HIDAPI devices on initialization
2018-09-17 11:35:22 -07:00
Sam Lantinga
81d9677756
Fixed crash launching under Steam on Mac OS X
2018-09-14 12:41:29 -07:00
Sam Lantinga
59d9b642c4
Actually left trigger is motion axis 17 and right trigger is motion axis 18, which will map in that order to SDL axes.
2018-05-23 17:15:33 -07:00
Sam Lantinga
31619e7cd8
Fixed default mapping for Android controller triggers (they were reversed)
2018-05-23 16:00:19 -07:00
Sam Lantinga
bebfd14c33
Merged latest changes from Steam Link app
2018-05-18 13:09:30 -07:00
Sam Lantinga
3a8c7aa2f0
Fixed return value
2018-03-19 14:52:53 -07:00
Sam Lantinga
1182588bae
Generalized the handling of instantaneous guide button presses so there's a minimum of 100 ms between guide button press and release.
...
This happens with at least the following controllers: All Apple MFI controllers, ASUS Gamepad, XiaoMi Bluetooth Controller
2018-03-19 14:42:51 -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
f0be85b8b3
Try to dynamically create a default Android game controller mapping based on the buttons and axes on the controller.
...
Include the controller USB VID/PID in the GUID where possible, as we do on other platforms.
2018-03-06 14:51:50 -08:00
Sam Lantinga
98409804b0
Use the real controller name for game controllers on iOS and Apple TV
2018-03-02 10:56:21 -08:00
Sam Lantinga
346af016a5
Updated copyright for 2018
2018-01-03 10:03:25 -08:00
Sam Lantinga
61322e904c
Fixed bug 4005 - Android, SDL_IsGameController() crashes is index is out of range
...
Sylvain
On Android, if you give an invalid index to SDL_IsGameController(), it will crash in SDL_SYS_IsDPAD_DeviceIndex().
2017-12-19 10:48:29 -08:00
Sam Lantinga
6e62d312ea
Fixed default Android D-PAD mapping so the back button is treated as B
2017-12-16 10:40:47 -08:00
Sam Lantinga
42b997becf
Fixed building on non-Android platforms
2017-11-01 10:07:04 -07:00
Sam Lantinga
7565396bf0
Added controller mapping for Android TV remotes
...
Also fixed the back button on the remote exiting the application
2017-11-01 10:06:58 -07:00
Sam Lantinga
6387f21f85
Exposed the joystick locking functions for multi-threaded access to the joystick API
2017-10-10 11:10:15 -07:00
Sam Lantinga
35811c4c2f
Fixed crash in SDL_IsGameController() on Windows if called when a controller is being removed
2017-10-09 11:45:15 -07:00
Sam Lantinga
1e46b7fc9a
Added stubs for simple Steam Controller support
2017-09-22 08:30:52 -07:00
Sam Lantinga
520aaf19a4
Fixed bug 3745 - specify SDLCALL as the calling convention for API callbacks
...
Patches contributed by Ozkan Sezer
2017-08-14 06:28:21 -07:00
Sam Lantinga
67823aa306
Fixed bug 3744 - missing SDLCALL in several functions
...
Ozkan Sezer
The attached patch adds missing SDLCALL to several functions, so that
they properly match the headers as intended.
2017-08-13 21:06:52 -07:00
Sam Lantinga
2a8d4de4af
Added check for XBOX in addition to Xbox and X-Box
2017-08-13 20:39:00 -07:00
Sam Lantinga
b3ecc4942c
Fixed compiler warnings on Visual Studio 2013
2017-08-12 00:04:46 -07:00
Sam Lantinga
3c8dc5ab15
Added a private hint for Steam to bypass the controller filtering for the Steam virtual gamepad
2017-08-09 12:38:20 -07:00
Sam Lantinga
a0941b37eb
Fixed Linux build
2017-08-09 12:11:59 -07:00
Sam Lantinga
b044a3bba8
Added SDL hints to filter the set of game controllers reported by SDL
2017-08-09 11:59:29 -07:00
Ryan C. Gordon
82d0a04881
Fix some more compiler warnings on armcc.
2017-03-03 16:38:17 -05:00
Philipp Wiesemann
f8d3d73cc9
Fixed comments.
2017-01-14 21:36:06 +01:00
Sam Lantinga
1b24bfad38
Updated copyright for 2017
2017-01-01 18:33:28 -08:00
Philipp Wiesemann
1a24600b5f
Fixed crash if allocating memory for game controller failed.
2016-12-28 20:10:48 +01:00
Sam Lantinga
df32741ff4
Fixed comment style
2016-12-27 02:04:38 -08:00
Sam Lantinga
c6e0424049
Split controller axes into positive and negative sides so each can be bound independently.
...
Using this a D-Pad can be mapped to a thumbstick and vice versa.
Also added support for inverted axes, improving trigger binding support
2016-12-27 01:39:07 -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
5ea622c38f
Fixed issue where the throttle and other axes on racing wheels don't start at zero and show up as immediate input when the wheel is turned for the first time. Wait until they are actually moved before generating input from them.
2016-12-22 17:33:45 -08:00
Sam Lantinga
6ece64092f
Protect the game controller API the same way the joystick API is protected from multi-threaded access
2016-12-08 10:13:45 -08:00
Sam Lantinga
428b0082bf
Add the controller mappings to the linked list in order
2016-11-29 22:02:37 -08:00
Sam Lantinga
a31f3d2c25
Added an API to iterate over game controller mappings
2016-11-29 06:36:57 -08:00
Philipp Wiesemann
0fac39e6db
Fixed two memory leaks if added game controller mapping has lower priority.
...
Found by buildbot.
2016-11-19 23:27:37 +01:00