Difference between revisions of "love.joystick.open"

m
m (notice template.)
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
{{oldin|[[0.9.0]]|090|type=function}}
 
{{oldin|[[0.9.0]]|090|type=function}}
 
Opens up a joystick to be used, i.e. makes it ready to use. By default joysticks that are available at the start of your game will be opened.
 
Opens up a joystick to be used, i.e. makes it ready to use. By default joysticks that are available at the start of your game will be opened.
<br><br>
+
{{notice|Unlike conventional Lua indexes, joysticks begin counting from 0 in LÖVE [[0.7.2]] and below. To to open the first joystick, you would use <tt>love.joystick.open(0)</tt>. This is not the case in LÖVE [[0.8.0]] and later.}}
NOTE: Unlike conventional Lua indexes, joysticks begin counting from 0. To to open the first joystick, you would use love.joystick.open(0). This is being changed to begin from one in the upcoming LOVE 0.8.0 stated [[https://bitbucket.org/rude/love/issue/223/joystick-feedback here]].
 
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===

Revision as of 18:06, 9 June 2019

Removed in LÖVE 0.9.0
This function is not supported in that and later versions.

Opens up a joystick to be used, i.e. makes it ready to use. By default joysticks that are available at the start of your game will be opened.

O.png Unlike conventional Lua indexes, joysticks begin counting from 0 in LÖVE 0.7.2 and below. To to open the first joystick, you would use love.joystick.open(0). This is not the case in LÖVE 0.8.0 and later.  


Function

Synopsis

open = love.joystick.open( joystick )

Arguments

number joystick
The joystick to be opened

Returns

boolean open
True if the joystick has been successfully opened or false on failure.

See Also


Other Languages