Fixed bug 3446 - The haptic API does not allow to select the direction axes

meyraud705

Added Linux implementation, otherwise you get "Unsupported direction type" error.
Added documentation to explain why one would use SDL_HAPTIC_FIRST_AXIS.
This commit is contained in:
Sam Lantinga committed 2020-03-17 14:18:05 -07:00
1 parent e6189f4046
commit 4c22a21e06
2 files changed
+15 -2

No files matched your search

+3 -1
View File
@@ -718,7 +718,9 @@ SDL_SYS_ToDirection(Uint16 *dest, SDL_HapticDirection * src)
*dest = (Uint16) tmp;
}
break;
case SDL_HAPTIC_FIRST_AXIS:
*dest = 0x4000;
break;
default:
return SDL_SetError("Haptic: Unsupported direction type.");
}