diff -uNr SDL2-2.0.4.orig/include/SDL_haptic.h SDL2-2.0.4.mod/include/SDL_haptic.h --- SDL2-2.0.4.orig/include/SDL_haptic.h 2016-01-02 20:56:31.000000000 +0100 +++ SDL2-2.0.4.mod/include/SDL_haptic.h 2017-03-09 21:29:08.785696800 +0100 @@ -323,6 +323,13 @@ */ #define SDL_HAPTIC_SPHERICAL 2 +/** + * \brief Uses first axis only. + * + * \sa SDL_HapticDirection + */ +#define SDL_HAPTIC_FIRST_AXIS 3 + /* @} *//* Direction encodings */ /* @} *//* Haptic features */ diff -uNr SDL2-2.0.4.orig/src/haptic/windows/SDL_dinputhaptic.c SDL2-2.0.4.mod/src/haptic/windows/SDL_dinputhaptic.c --- SDL2-2.0.4.orig/src/haptic/windows/SDL_dinputhaptic.c 2017-03-09 22:05:47.250582300 +0100 +++ SDL2-2.0.4.mod/src/haptic/windows/SDL_dinputhaptic.c 2017-03-09 22:04:05.200473600 +0100 @@ -597,6 +597,10 @@ if (naxes > 2) rglDir[2] = dir->dir[2]; return 0; + case SDL_HAPTIC_FIRST_AXIS: + effect->dwFlags |= DIEFF_CARTESIAN; + rglDir[0] = 0; + return 0; default: return SDL_SetError("Haptic: Unknown direction type."); @@ -645,7 +649,11 @@ envelope->dwSize = sizeof(DIENVELOPE); /* Always should be this. */ /* Axes. */ - dest->cAxes = haptic->naxes; + if (src->constant.direction.type == SDL_HAPTIC_FIRST_AXIS) { + dest->cAxes = 1; + } else { + dest->cAxes = haptic->naxes; + } if (dest->cAxes > 0) { axes = SDL_malloc(sizeof(DWORD) * dest->cAxes); if (axes == NULL) {