sdlSetGamepadEventsEnabled function gamepad

void sdlSetGamepadEventsEnabled(
  1. bool enabled
)

Set the state of gamepad event processing.

If gamepad events are disabled, you must call SDL_UpdateGamepads() yourself and check the state of the gamepad when you want gamepad information.

\param enabled whether to process gamepad events or not.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.2.0.

\sa SDL_GamepadEventsEnabled \sa SDL_UpdateGamepads

extern SDL_DECLSPEC void SDLCALL SDL_SetGamepadEventsEnabled(bool enabled)

Implementation

void sdlSetGamepadEventsEnabled(bool enabled) {
  final sdlSetGamepadEventsEnabledLookupFunction = _libSdl
      .lookupFunction<Void Function(Uint8 enabled), void Function(int enabled)>(
        'SDL_SetGamepadEventsEnabled',
      );
  return sdlSetGamepadEventsEnabledLookupFunction(enabled ? 1 : 0);
}