Module fermium::gamecontroller

source ·
Expand description

The SDL “game controller” API lets you view any joystick as being (approximately) an XBox 360 controller.

This sounds silly at first, but is actually pretty useful in the common case. It sorts out a lot of the button and axis stuff for you.

In order to use these functions, SDL_Init must have been called with the SDL_INIT_GAMECONTROLLER flag. This causes SDL to scan the system for game controllers, and load appropriate drivers.

If you would like to receive joystick updates while the application is in the background, you should set the SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS hint before calling SDL_Init.

See Also: joystick

Structs

Constants

Functions

Unions