---
name: "SDL_JoystickEventState"
section: "3"
platform: "linux"
package: "libsdl1.2-dev"
version: "1.2.15+dfsg2-8"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/SDL_JoystickEventState"
---

# SDL\_JoystickEventState(3)

Enable/disable joystick event polling

## NAME

SDL\_JoystickEventState - Enable/disable joystick event polling

## SYNOPSIS

**#include "SDL.h"**

**int SDL\_JoystickEventState**(**int state**);

## DESCRIPTION

This function is used to enable or disable joystick event processing. With joystick event processing disabled you will have to update joystick states with **SDL\_JoystickUpdate** and read the joystick information manually. **state** is either **SDL\_QUERY**, **SDL\_ENABLE** or **SDL\_IGNORE**.

**Note:**

**Joystick event handling is prefered**

## RETURN VALUE

**If state** is **SDL\_QUERY** then the current state is returned, otherwise the new processing **state** is returned.

## SEE ALSO

*SDL Joystick Functions*, **SDL\_JoystickUpdate**, **SDL\_JoyAxisEvent**, **SDL\_JoyBallEvent**, **SDL\_JoyButtonEvent**, **SDL\_JoyHatEvent**
