Commit graph

20 commits

Author SHA1 Message Date
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
Ryan C. Gordon
3d19f803d8 Added PS3 game controller config for Linux. 2013-02-25 00:45:25 -05:00
Ryan C. Gordon
6c4a53f561 Fixed a minor typo. 2013-02-24 22:56:35 -05:00
Ryan C. Gordon
2452978990 Added an X360 game controller config for Linux. 2013-02-24 22:56:24 -05:00
Sam Lantinga
95dcfa4c28 Happy New Year! 2013-02-15 08:47:44 -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
b836001559 Hopefully fixed the last of the C variable declaration problems which caused compile failures with Visual Studio. 2013-02-11 18:28:05 -08:00
Sam Lantinga
57163e457f Fixed C variable declarations 2013-02-11 18:13:52 -08:00
Sam Lantinga
e2aa9f0afb Fixed compiler warning (and undefined behavior) in game controller event filter. 2013-02-11 17:25:58 -08:00
Sam Lantinga
b73214bd02 tree 97aca305664b
parent 6a9ca692cd65
author Edward Rudd <urkle@outoforder.cc> 1358030048 18000
committer Edward Rudd <urkle@outoforder.cc> 1358030048 18000
revision 6822
branch default

rework and fix handling of hat to button mappings

- doesn't assume it's always mapped to dpad
- properly handles multiple hats (up to 4)
- properly handles multiple presses (e.g. up and right)
- properly handles multiple gamepads
2013-02-11 11:21:54 -08:00
Sam Lantinga
290c391df5 tree 0c86a223596d
parent 44e12dd8ee8e
author Edward Rudd <urkle@outoforder.cc> 1358030047 18000
committer Edward Rudd <urkle@outoforder.cc> 1358030047 18000
revision 6821
branch default

Fix a bad mapping from "axis" to "button"
2013-02-11 11:21:19 -08:00
Sam Lantinga
65399f4c26 tree 8cbca1e6b293
parent 7ddddb71cec9
author Edward Rudd <urkle@outoforder.cc> 1358030045 18000
committer Edward Rudd <urkle@outoforder.cc> 1358030045 18000
revision 6820
branch default

Consolidate iterating the SupportedControllers array

also fix memory leak when controller mapping not found
2013-02-11 11:20:49 -08:00
Sam Lantinga
4cec546dca Fixed crash when the game controller mapping hint is set - the hint was duplicated and not null terminated. 2013-01-25 14:25:19 -08:00
Sam Lantinga
89ef9e3168 Changes from Alfred:
- rename JoystickGUID -> SDL_JoystickGUID
- change SDL_JoystickGetGUIDString to take the string as an arg, rather than doing a malloc
2012-12-11 11:54:32 -08:00
Sam Lantinga
b165aa8c74 Fixed compiler warnings 2012-11-27 01:07:44 -08:00
Sam Lantinga
cf0dfcbaa4 Fixed unused variable warning 2012-11-26 23:53:18 -08:00
Sam Lantinga
86e0e26475 The XInput code is only available in the DirectInput joystick driver. 2012-11-26 23:50:12 -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