Return whether a joystick has a particular sensor.
Defined in <SDL3/SDL_joystick.h>
bool SDL_JoystickHasSensor(SDL_Joystick *joystick, SDL_SensorType type);| SDL_Joystick * | joystick | the joystick to query. |
| SDL_SensorType | type | the type of sensor to query. |
(bool) Returns true if the sensor exists, false otherwise.
Sensors are disabled by default and SDL_SetJoystickSensorEnabled() is used to enable them.
It is safe to call this function from any thread.
This function is available since SDL 3.6.0.