Fixed bug 3191 - haptic system on android?

Patch provided by jintiao and Milan Nikolic, thanks!
This commit is contained in:
Sam Lantinga 2017-08-12 08:15:09 -07:00
parent 78c84e7029
commit 0a52db54bd
10 changed files with 521 additions and 3 deletions

View file

@ -313,6 +313,7 @@ SDL_HapticOpenFromJoystick(SDL_Joystick * joystick)
SDL_memset(haptic, 0, sizeof(SDL_Haptic));
haptic->rumble_id = -1;
if (SDL_SYS_HapticOpenFromJoystick(haptic, joystick) < 0) {
SDL_SetError("Haptic: SDL_SYS_HapticOpenFromJoystick failed.");
SDL_free(haptic);
return NULL;
}