diff -r b68bc68d5cce include/SDL_haptic.h --- a/include/SDL_haptic.h Tue Mar 17 09:35:42 2020 +0100 +++ b/include/SDL_haptic.h Tue Mar 17 13:23:53 2020 +0100 @@ -338,7 +338,17 @@ /** * \brief Uses first axis only. - * + * For some device with only one axis (steering wheel,...), + * SDL_HAPTIC_CARTESIAN does not work. SDL_HAPTIC_FIRST_AXIS can be used in + * this case. + * Using SDL_HAPTIC_FIRST_AXIS is equivalent to : + * \code + * SDL_HapticDirection direction; + * direction.type = SDL_HAPTIC_CARTESIAN; + * direction.dir[0] = 1; + * direction.dir[1] = 0; + * direction.dir[2] = 0; + * \endcode * \sa SDL_HapticDirection */ #define SDL_HAPTIC_FIRST_AXIS 3 @@ -451,6 +461,7 @@ * \sa SDL_HAPTIC_POLAR * \sa SDL_HAPTIC_CARTESIAN * \sa SDL_HAPTIC_SPHERICAL + * \sa SDL_HAPTIC_FIRST_AXIS * \sa SDL_HapticEffect * \sa SDL_HapticNumAxes */ diff -r b68bc68d5cce src/haptic/linux/SDL_syshaptic.c --- a/src/haptic/linux/SDL_syshaptic.c Tue Mar 17 09:35:42 2020 +0100 +++ b/src/haptic/linux/SDL_syshaptic.c Tue Mar 17 13:23:53 2020 +0100 @@ -718,7 +718,9 @@ *dest = (Uint16) tmp; } break; - + case SDL_HAPTIC_FIRST_AXIS: + *dest = 0x4000; + break; default: return SDL_SetError("Haptic: Unsupported direction type."); }