SDL/src
Sam Lantinga e7edcf1b2f Fixed bug 2823 - Release events for triggers receive wrong centered value
Ryochan7

I have been using SDL 2 for a little project that I have been developing for a while. My project is called antimicro and it takes gamepad input and then translates gamepad events into keyboard and mouse events. SDL is used to read the input from an XInput gamepad and it works great for the most part. However, there is one glaring problem that I have encountered.

When a device is unplugged and SDL sends the centered value release events for all axes, buttons, and hats, SDL does not use the proper centered value for the triggers. It pushes an SDL_JOYAXISMOTION event onto the queue with a value of 0 for all axes. That value is converted to around 16,000 for a Game Controller. That value is incorrect for triggers and, in my program, that causes any bindings that are assigned to the triggers to get activated. With most profiles, that will typically mean that a mouse right click and left click will be activated before the device is finally seen as removed and then those bindings are released by antimicro.
2016-10-07 16:04:15 -07:00
..
atomic Updated copyright to 2016 2016-01-02 10:10:34 -08:00
audio audio: Don't trust audio drivers to drain pending audio. 2016-10-07 15:13:46 -04:00
core Fixed compiler warning about missing field initializers 2016-10-04 03:42:42 -07:00
cpuinfo Updated copyright to 2016 2016-01-02 10:10:34 -08:00
dynapi Added SDL_SetWindowResizable(). (thanks, Ethan!) 2016-09-29 22:52:41 -04:00
events Fixed bug 3161 - SDL_WINDOWEVENT_EXPOSED event possible queue overflow 2016-10-01 13:38:30 -07:00
file Updated copyright to 2016 2016-01-02 10:10:34 -08:00
filesystem Fixed compiling if filesystem is disabled (thanks, Elias!). 2016-08-30 21:14:13 +02:00
haptic Fixed bug 3021 - HapticOpenFromJoystick() problems 2016-10-04 03:50:28 -07:00
joystick Fixed bug 2823 - Release events for triggers receive wrong centered value 2016-10-07 16:04:15 -07:00
libm Updated copyright to 2016 2016-01-02 10:10:34 -08:00
loadso Enable SDL_LoadObject on iOS 8+ and tvOS. 2016-09-25 15:02:06 -03:00
main Fixed bug 3320 - SDL_windows_main.c defines both console application entry points 2016-10-01 12:31:31 -07:00
power Initial Apple TV / tvOS support. 2016-09-13 22:18:06 -03:00
render Fixed wrong pixel format if reading pixels from OpenGL renderer. 2016-10-02 22:32:35 +02:00
stdlib Fixed potential buffer overflow in SDL_vsnprintf() (thanks, Taylor!). 2016-10-04 14:25:31 -04:00
test We should be using a string constant for the strftime format string 2016-10-01 10:38:15 -07:00
thread Fixed bug 3388 - Fail to build src/thread/windows/SDL_systhread.c on MinGW 4.9.3 2016-10-01 10:08:34 -07:00
timer threads: Move SDL's own thread creation to a new internal API. 2016-04-12 16:45:10 -04:00
video Fixed bug 2808 - Fix SDL reporting wrong window size on resume 2016-10-07 15:21:19 -07:00
SDL_assert_c.h Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_assert.c Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_error_c.h Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_error.c Only use GCC pragmas when we're building with GCC 2016-10-01 11:22:39 -07:00
SDL_hints.c Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_internal.h Updated copyright to 2016 2016-01-02 10:10:34 -08:00
SDL_log.c Fixed bug 3323 - SDL_LogOutput prints message twice on Windows when linked with libc 2016-10-01 12:28:05 -07:00
SDL.c Initial Apple TV / tvOS support. 2016-09-13 22:18:06 -03:00