sdlJoystickEventState function

int sdlJoystickEventState(
  1. int state
)

Enable/disable joystick event polling.

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

It is recommended that you leave joystick event handling enabled.

WARNING: Calling this function may delete all events currently in SDL's event queue.

\param state can be one of SDL_QUERY, SDL_IGNORE, or SDL_ENABLE \returns 1 if enabled, 0 if disabled, or a negative error code on failure; call SDL_GetError() for more information.

If state is SDL_QUERY then the current state is returned, otherwise the new processing state is returned.

\since This function is available since SDL 2.0.0.

\sa SDL_GameControllerEventState

extern DECLSPEC int SDLCALL SDL_JoystickEventState(int state)

Implementation

int sdlJoystickEventState(int state) {
  final sdlJoystickEventStateLookupFunction = libSdl2.lookupFunction<
      Int32 Function(Int32 state),
      int Function(int state)>('SDL_JoystickEventState');
  return sdlJoystickEventStateLookupFunction(state);
}