SDL-mirror/src
Sam Lantinga a8055a9808 Fixed bug: SDL2 Xinput joystick axis jumps from positive to negative
Franz Schrober

Attached is my patch. It ensures that the values are correctly limitted between -32767 and 32767 (otherwise the negator - and the conversion to sint16 would corrupt the result)

I am using Motioninjoy (Dualshock 3 Sixaxxis controller on Windows 7)  together with a recent SDL2 (post rc1) and noticed with the testjoystick binary that the axis 3 (left analog up/down) jumps when going in down direction from 32257 to -32768. This seems obviously wrong and I have never seen this before. In my games the people are now going backwards before they start to sprint forward when the player actually wants to run as fast as possible backwards. This also happens on the axis 2 (right analog stick up/down)

This problem doesn't happen in DX mode
2013-06-27 11:21:37 -07:00
..
atomic File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
audio Fixed bug 1913 - state->index may get negative in SDL_wave.c file. 2013-06-18 00:50:35 -07:00
core Moved prototype for static function out of header file to prevent warnings. 2013-05-30 23:25:03 +02:00
cpuinfo Happy New Year! 2013-02-15 08:47:44 -08:00
events Fixed bug 1916 - SDL_Keysym contains a deprecated field for unicode which may be removed. 2013-06-18 00:39:47 -07:00
file Fixed implicit function declaration for SDL_AndroidGetInternalStoragePath(). 2013-06-02 14:13:21 +02:00
haptic Fixed warning about unused variable. 2013-06-27 11:17:48 -07:00
joystick Fixed bug: SDL2 Xinput joystick axis jumps from positive to negative 2013-06-27 11:21:37 -07:00
libm Happy New Year! 2013-02-15 08:47:44 -08:00
loadso Happy New Year! 2013-02-15 08:47:44 -08:00
main Added some extra protection to notify the developer if they haven't initialized the application properly. 2013-06-05 21:23:59 -07:00
power File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
render Fixed bug 1929 - SDL_Texture* from SDL_CreateTexture() causes GL_BindTexture() to segfault 2013-06-25 20:21:31 -07:00
stdlib Fixed crash with movaps instruction in SDL_memcpy(), due to unaligned Uint32* cast and -O3 vectorization optimizations with gcc 4.9.0 2013-05-27 16:18:11 -07:00
test Fix bug 1492: Visual Studio builds sdl.lib and sdl.dll for version 2.0 (contributed by Jan Reitz); update SDL_bool handling in test_common to fix VS compiler warnings 2013-05-30 20:03:56 -07:00
thread Fixed SDL building with the minimal configuration 2013-06-13 22:10:10 -07:00
timer Updated timer test and fixed performance counter on Mac OS X 2013-06-23 22:19:38 -07:00
video Fixed bug 1916 - SDL_Keysym contains a deprecated field for unicode which may be removed. 2013-06-18 00:39:47 -07:00
SDL.c Added some extra protection to notify the developer if they haven't initialized the application properly. 2013-06-05 21:23:59 -07:00
SDL_assert.c Happy New Year! 2013-02-15 08:47:44 -08:00
SDL_assert_c.h Happy New Year! 2013-02-15 08:47:44 -08:00
SDL_error.c File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
SDL_error_c.h File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
SDL_fatal.c Happy New Year! 2013-02-15 08:47:44 -08:00
SDL_fatal.h Happy New Year! 2013-02-15 08:47:44 -08:00
SDL_hints.c File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
SDL_hints_c.h File style cleanup for the SDL 2.0 release 2013-05-18 14:17:52 -07:00
SDL_log.c Fixed SDL building with the minimal configuration 2013-06-13 22:10:10 -07:00