Document the range of trigger axes for virtual joysticks

Fixes https://github.com/libsdl-org/SDL/issues/6130
This commit is contained in:
Sam Lantinga 2022-08-25 10:15:45 -07:00
parent 40b2499273
commit e4b85091fd
1 changed files with 2 additions and 0 deletions

View File

@ -425,6 +425,8 @@ extern DECLSPEC SDL_bool SDLCALL SDL_JoystickIsVirtual(int device_index);
* the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, * the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout,
* SDL_WaitEvent. * SDL_WaitEvent.
* *
* Note that when sending trigger axes, you should scale the value to the full range of Sint16. For example, a trigger at rest would have the value of `SDL_JOYSTICK_AXIS_MIN`.
*
* \param joystick the virtual joystick on which to set state. * \param joystick the virtual joystick on which to set state.
* \param axis the specific axis on the virtual joystick to set. * \param axis the specific axis on the virtual joystick to set.
* \param value the new value for the specified axis. * \param value the new value for the specified axis.