sdlSetGamepadEventsEnabled function

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.

\since This function is available since SDL 3.1.3.

\sa SDL_GamepadEventsEnabled \sa SDL_UpdateGamepads

extern SDL_DECLSPEC void SDLCALL SDL_SetGamepadEventsEnabled(bool enabled)

Implementation

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