Exemple #1
0
func GetJoysticks() []*Joystick {
	var n int

	n = int(C.al_get_num_joysticks())

	sticks := make([]*Joystick, n)
	for i := 0; i < n; i++ {
		var stick *Joystick

		stick = (*Joystick)(C.al_get_joystick(C.int(i)))

		sticks[i] = stick
	}
	return sticks
}
Exemple #2
0
// Returns the joyn'th joystick, or nil if no such stick exists.
func GetJoystick(joyn int) *Joystick {
	return wrapJoystick(C.al_get_joystick(C.int(joyn)))
}
Exemple #3
0
func GetJoystick(num int32) *Joystick {
	return (*Joystick)(unsafe.Pointer(C.al_get_joystick(C.int(num))))
}