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
2020-03-17 14:18:05 -07:00
parent e6189f4046
commit 4c22a21e06
2 changed files with 15 additions and 2 deletions

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.");
}