hasSensor method

bool hasSensor(
  1. int type
)

Return whether a gamepad has a particular sensor.

\param gamepad the gamepad to query. \param type the type of sensor to query. \returns true if the sensor exists, false otherwise.

\since This function is available since SDL 3.1.3.

\sa SDL_GetGamepadSensorData \sa SDL_GetGamepadSensorDataRate \sa SDL_SetGamepadSensorEnabled

extern SDL_DECLSPEC bool SDLCALL SDL_GamepadHasSensor(SDL_Gamepad *gamepad, SDL_SensorType type)

Implementation

bool hasSensor(int type) {
  return sdlGamepadHasSensor(this, type);
}