Commit Graph

14 Commits

Author SHA1 Message Date
Sam Lantinga
3b18c796ed Fixed bug 3512 - Memory leak of SDL_Joystick axes_zero array
Benjamin Harris

Found with valgrind and confirmed in the 2.0.5 source code.
One-line fix in SDL_JoystickClose?
2016-12-09 01:29:52 -08:00
Sam Lantinga
a525017139 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
Philipp Wiesemann
a7655d77d1 Fixed warning about storing an unused value.
Found by buildbot.
2016-11-30 23:31:23 +01:00
Sam Lantinga
5220759f03 Made it safe to update joysticks from multiple threads, fixes crash in Steam 2016-11-29 05:04:42 -08:00
Sam Lantinga
e9983c7b0f We are comparing 16-bit values 2016-11-24 11:53:23 -08:00
Sam Lantinga
b6542ab237 Fixed whitespace 2016-11-11 04:30:09 -08:00
Sam Lantinga
ac74e16cde 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
Sam Lantinga
8bc5c57d2e Fixed recentering triggers when the application doesn't have focus 2016-10-07 16:13:37 -07:00
Sam Lantinga
ad1bfea5a0 Added SDL_PrivateJoystickAdded() and SDL_PrivateJoystickRemoved()
Updated the removal code to iterate over all joystick add messages instead of just the first one.
2016-08-26 12:18:08 -07:00
Sam Lantinga
42065e785d Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Ryan C. Gordon
e6ad29aec8 Added SDL_JoystickFromInstanceID() and SDL_GameControllerFromInstanceID(). 2015-11-14 12:35:45 -05:00
Sam Lantinga
a0c4b56ff9 SDL - added new SDL_JoystickCurrentPowerLevel() API that returns the battery level of the selected joystick. Currently only implemented for XInput devices, other platforms are a TODO.
CR: Sam
2015-09-30 15:39:30 -07:00
Alex Szpakowski
2bf6f1bcb7 Added initial support for MFi game controllers on iOS. 2015-09-20 23:08:36 -03:00
Philipp Wiesemann
0e45984fa0 Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00