Commit graph

52 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
346af016a5 Updated copyright for 2018 2018-01-03 10:03:25 -08: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
47e7307c38 Added an API to get the joystick instance ID before opening the device: SDL_JoystickGetDeviceInstanceID() 2017-03-09 16:09:16 -08:00
Sam Lantinga
833a605067 Fixed whitespace 2017-01-31 13:30:35 -08:00
Sam Lantinga
49e3e7f731 Added support for the HOTAS Warthog throttle 2017-01-31 12:23:29 -08:00
Philipp Wiesemann
e11f2ffc26 Fixed compiler warning about comma at end of enum. 2017-01-30 22:20:20 +01:00
Sam Lantinga
83061d091e Added an API to get the type of a connected joystick 2017-01-27 05:59:58 -08:00
Sam Lantinga
724ff3b29e Added SDL_JoystickGetAxisInitialState() to get a joystick axis' initial value.
This is useful for controller mapping programs to determine an axis' zero state
2017-01-04 10:28:07 -08:00
Sam Lantinga
1b24bfad38 Updated copyright for 2017 2017-01-01 18:33:28 -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
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
e47eab0ac9 Minor whitespace fix. 2015-11-14 14:53:44 -05: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
bf785c766b 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
Philipp Wiesemann
b032dd985f Fixed spaces in header file. 2015-07-16 21:48:35 +02: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
Philipp Wiesemann
a2573968f6 Fixed typo in header file documentation comment. 2014-11-23 11:26:46 +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
Ryan C. Gordon
d2671e8a86 Fixed a few public APIs that we accidentally neglected to mark as SDLCALL.
Fixes Bugzilla #2262.

--HG--
extra : rebase_source : ba28833dc17e3cb29c4566c7396f5e005d448576
2013-11-23 15:52:49 -05:00
Gabriel Jacobo
298ce1c1a7 OCD fixes: Adds a space after /* (glory to regular expressions!) 2013-08-21 09:47:10 -03:00
Gabriel Jacobo
271e0d67c4 OCD fixes: Adds a space before */ 2013-08-21 09:43:09 -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
Sam Lantinga
69b8182419 The joystick events contain a joystick instance ID, which is a signed value, with -1 being invalid. 2013-03-06 11:59:21 -08:00
Sam Lantinga
c02018f852 Fixed the joystick id usage in the joystick and game controller events. 2013-03-02 17:51:32 -08:00
Sam Lantinga
95dcfa4c28 Happy New Year! 2013-02-15 08:47:44 -08:00
Ryan C. Gordon
3da6d29ab7 Fixed comment on SDL_JoystickGetGUIDString(). 2012-12-11 16:53:38 -05: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
03e08a6a79 Organized joystick hotplug code a bit.
Cleaned up names, return types, etc.
2012-11-27 00:58: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
Sam Lantinga
028e5dcdbd Happy New Year! 2011-12-31 09:28:07 -05:00
Sam Lantinga
b0660ba5ff SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
e5803d148c Happy 2011! :) 2011-02-11 22:37:15 -08:00
Sam Lantinga
4d3df8b3e3 Fixed bug #926
Updated copyright to LGPL version 2.1 and year 2010

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404453
2010-01-24 21:10:53 +00:00
Sam Lantinga
1cbfd5b6e0 Partial fix for bug #859
Header file update from Ken for improved doxygen output

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%404127
2009-10-19 13:31:58 +00:00
Sam Lantinga
0c30a927ed Updated copyright date
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403321
2008-12-08 00:27:32 +00:00
Sam Lantinga
0f030a1802 SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401938
2006-07-10 21:04:37 +00:00
Sam Lantinga
684909fae2 More header massaging... works great on Windows. ;-)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401362
2006-02-10 06:48:43 +00:00
Sam Lantinga
3732b0b8bd *** empty log message ***
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401360
2006-02-10 03:19:02 +00:00
Sam Lantinga
eea4857268 Updated copyright information and removed rcs id lines (problematic in branch merges)
I batch edited these files, so please let me know if I've accidentally removed anybody's
credit here.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401315
2006-02-01 06:32:25 +00:00
Sam Lantinga
249a5dcd55 Date: Wed, 7 Jul 2004 12:57:58 +0200
From: "Markus F.X.J. Oberhumer"
Subject: [SDL-CVS] [patch] small fix for SDL_joystick.h

the tiny patch below (against current CVS) fixes a syntax error
(not allow compilers allow multiple __cdecl).

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40906
2004-07-18 19:05:06 +00:00
Sam Lantinga
cb9c2efd17 Updated copyright information for 2004 (Happy New Year!)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40770
2004-01-04 16:49:27 +00:00
Sam Lantinga
808d714de4 Explicitly specify the SDL API calling convention (C by default)
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40338
2002-04-11 14:35:16 +00:00
Sam Lantinga
ea5d630479 Updated copyright information for 2002
--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40298
2002-03-06 11:23:08 +00:00