sdlSetJoystickSensorEnabled function joystick
Set whether data reporting for a joystick sensor is enabled.
Sensors are disabled by default and this function is used to enable them.
\param joystick the joystick to update. \param type the type of sensor to enable/disable. \param enabled whether data reporting should be enabled. \returns true on success or false on failure; call SDL_GetError() for more information.
\threadsafety It is safe to call this function from any thread.
\since This function is available since SDL 3.6.0.
\sa SDL_JoystickHasSensor \sa SDL_JoystickSensorEnabled
extern SDL_DECLSPEC bool SDLCALL SDL_SetJoystickSensorEnabled(SDL_Joystick *joystick, SDL_SensorType type, bool enabled)
See also:
Implementation
bool sdlSetJoystickSensorEnabled(
Pointer<SdlJoystick> joystick,
int type,
bool enabled,
) {
final sdlSetJoystickSensorEnabledLookupFunction = _libSdl
.lookupFunction<
Bool Function(Pointer<SdlJoystick> joystick, Int32 type, Bool enabled),
bool Function(Pointer<SdlJoystick> joystick, int type, bool enabled)
>('SDL_SetJoystickSensorEnabled');
return sdlSetJoystickSensorEnabledLookupFunction(joystick, type, enabled);
}