sdlGetJoystickSensorDataRate function joystick
Get the data rate (number of events per second) of a joystick sensor.
\param joystick the joystick to query. \param type the type of sensor to query. \returns the data rate, or 0.0f if the data rate is not available.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.6.0.
extern SDL_DECLSPEC float SDLCALL SDL_GetJoystickSensorDataRate(SDL_Joystick *joystick, SDL_SensorType type)
See also:
Implementation
double sdlGetJoystickSensorDataRate(Pointer<SdlJoystick> joystick, int type) {
final sdlGetJoystickSensorDataRateLookupFunction = _libSdl
.lookupFunction<
Float Function(Pointer<SdlJoystick> joystick, Int32 type),
double Function(Pointer<SdlJoystick> joystick, int type)
>('SDL_GetJoystickSensorDataRate');
return sdlGetJoystickSensorDataRateLookupFunction(joystick, type);
}