Home

Joystick

Handles inputs from joysticks

Operations

New

Open a joystick for use

New(device_index:Int)
Parameters
NameTypeDescription
device_indexIntindex of the joystick to query

Free

Close joystick previously opened

method : public : Free() ~ Nil

GetName

Get the implementation dependent name of a joystick

method : public : GetName() ~ String
Return
TypeDescription
Stringname of the selected joystick. If no name can be found, this function returns NULL,

IsNull

Determines if the underlying SDL C-struct is NULL

method : public : IsNull() ~ Bool
Return
TypeDescription
Booltrue if NULL, false otherwise

Number

Count of the number of joysticks attached to the system

function : public : Number() ~ Int
Return
TypeDescription
Intnumber of attached joysticks on success or a negative error code on failure