Module sdl2::joystick [] [src]

Structs

Guid

Wrapper around a SDL_JoystickGUID, a globally unique identifier for a joystick.

Joystick

Wrapper around the SDL_Joystick object

Enums

HatState

This is represented in SDL2 as a bitfield but obviously not all combinations make sense: 5 for instance would mean up and down at the same time... To simplify things I turn it into an enum which is how the SDL2 docs present it anyway (using macros).

Functions

get_device_guid

Get the GUID for the joystick number id

get_event_state

Return true if joystick events are processed.

name_for_index

Return the name of the joystick at index id

num_joysticks

Retreive the total number of attached joysticks and controllers identified by SDL.

set_event_state

If state is true joystick events are processed, otherwise they're ignored.

update

Force joystick update when not using the event loop