Commit Graph

29 Commits (0918903f3cc33dc4a15b5eecb24f845e437b645d)

Author SHA1 Message Date
Sam Lantinga de2001eeee Fixed binding the D-PAD on the 8BitDo M30 controller 2020-03-13 13:05:40 -07:00
Sam Lantinga 25061816bf Fixed compile warning 2020-03-02 10:58:08 -08:00
Sam Lantinga 0a7fe18fe6 On Mac OSX there are spurious hat events at program start, so skip these 2020-01-17 11:06:02 -08:00
Sam Lantinga a8780c6a28 Updated copyright date for 2020 2020-01-16 20:49:25 -08:00
Sam Lantinga 8ce894a316 Ignore axis jitter when mapping controllers 2019-12-05 13:18:56 -08:00
Sam Lantinga 8aaf945b2f Fixed mapping controllers that have axes that start at -32768 and then snap to 0 at the first input report 2019-11-28 11:44:15 -08:00
Sam Lantinga c8896e4681 Turned on controllermap debug output by default 2019-11-21 10:09:26 -08:00
Ozkan Sezer 32bb8b4b40 test: replace some exit()s with returns. 2019-09-10 10:03:20 +03:00
Sam Lantinga 5e13087b0f Updated copyright for 2019 2019-01-04 22:01:14 -08:00
Sam Lantinga e3cc5b2c6b Updated copyright for 2018 2018-01-03 10:03:25 -08:00
Philipp Wiesemann 20c846ebe7 Fixed warning about implicit conversion in controllermap program. 2017-03-04 23:05:47 +01:00
Sam Lantinga a395a90759 Fixed mapping the PG-9021 which, on Linux, emits a button partway through the trigger press along with axis motion all along the pull 2017-01-20 16:40:11 -08:00
Sam Lantinga 4938c5054e 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 1ddff75c70 Some controllers have trouble getting out to 20000 2017-01-04 05:09:02 -08:00
Sam Lantinga 082132a70c Fixed binding the D-pad on some Super NES style controllers
Fixed a case where partial trigger pull could be bound to another button

There is a fundamental problem not resolved by this commit:

Some controllers have axes (triggers, pedals, etc.) that don't start at zero, but we're guaranteed that if we get a value that it's correct. For these controllers, the current code works, where we take the first value we get and use that as the zero point and generate axis motion starting from that point on.

Other controllers have digital axes (D-pad) that assume a zero starting point, and the first value we get is the min or max axis value when the D-pad is moved. For these controllers, the current code thinks that the zero point is the axis value after the D-pad motion and this doesn't work.

My hypothesis is that the first class of devices is more common and that we should solve for that, and add an exception to SDL_JoystickAxesCenteredAtZero() as needed for the second class of devices.
2017-01-03 23:39:28 -08:00
Sam Lantinga 45b774e3f7 Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Philipp Wiesemann de79828b9f Fixed warning about unused variable in controllermap program. 2016-12-28 20:11:12 +01:00
Sam Lantinga 21cb42d79b Make sure we go all the way back (within the XBox controller dead zone) to prevent accidentally binding axes inverted 2016-12-27 09:51:58 -08:00
Sam Lantinga 6d7da0887d 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
Philipp Wiesemann 0a3f9d0cfb Fixed warning about unused variable in controllermap program. 2016-12-16 22:58:16 +01:00
Sam Lantinga 0c5e7a1067 Fixed handling joysticks that send multiple events for a single control, e.g. both a button and axis event for a trigger.
Tested with the 8Bitdo NES30 Pro on Linux
2016-12-15 14:27:22 -08:00
Sam Lantinga c406f649b3 Added USB VID/PID information to the SDL test programs 2016-11-10 18:53:50 -08:00
Philipp Wiesemann 826508b6ee Removed unused constants in controllermap program. 2016-10-15 20:01:30 +02:00
Sam Lantinga cb7b823cc1 Fixed black screen on Steam Link 2016-10-13 02:09:37 -07:00
Philipp Wiesemann 929b965c62 Fixed compiling of three test programs with C++. 2016-09-21 23:06:38 +02:00
Sam Lantinga 42065e785d Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Sam Lantinga 7b680a2ab7 Fixed mapping third party XBox controllers that have the trigger axis all the way in until they are pulled and get updated values. 2015-12-18 18:49:23 -08:00
Philipp Wiesemann 11d98995da Replaced tabs with spaces in test programs. 2015-11-25 21:39:28 +01: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