cock.addJoystick

Adds new joystick to the object by given joystick number.

Function

Synopsis

joystick = cock.addJoystick ( self, number )

Arguments

table self
An object to use.
number number
Optional. LÖVE joystick number to hook up. Will use 1 if not provided.

Returns

number joystick
Internal joystick number.

Remarks

If function fails to find specified joystick, it will create a dummy joystick. It will represent virtual non-functional joystick. It will accept all joystick operaitons, but will not carry out any of them. Dummy joysticks do not yield any output. Function cock.reloadJoysticks will happily override dummy joysticks with real ones.

See also