SDL_GamepadHasSensor - Man Page

Return whether a gamepad has a particular sensor.

Header File

Defined in SDL3/SDL_gamepad.h

Synopsis

#include "SDL3/SDL.h"

bool SDL_GamepadHasSensor(SDL_Gamepad *gamepad, SDL_SensorType type);

Function Parameters

gamepad

the gamepad to query.

type

the type of sensor to query.

Return Value

Returns true if the sensor exists, false otherwise.

Availability

This function is available since SDL 3.2.0.

See Also

·(3), SDL_GetGamepadSensorData(3), ·(3), SDL_GetGamepadSensorDataRate(3), ·(3), SDL_SetGamepadSensorEnabled(3)

Referenced By

SDL_SetGamepadSensorEnabled(3).

SDL 3.2.2 Simple Directmedia Layer SDL3 FUNCTIONS