Handbook
Glossary
find-controller-instance ( product-id instance-id -- controller/f )
Game controller input
Prev:
find-controller-products ( product-id -- sequence )
Next:
product-string ( controller -- string )
Vocabulary
game
.
input
Inputs
product-id
A product ID as returned by
product-id
instance-id
An instance ID as returned by
instance-id
.
Outputs
controller/f
A
controller
object, or
f
Word description
Returns the
controller
instance identified by
product-id
and
instance-id
. If the identified device is not currently attached,
f
is returned.
See also
product-string
,
product-id
,
instance-id
,
find-controller-products
Definition
USING:
kernel
sequences
;
IN:
game.input
:
find-controller-instance
( product-id instance-id -- controller/f )
get-controllers
[
[
product-id
=
]
[
instance-id
=
]
bi-curry
bi*
and
]
2with
find
nip
;