Пример #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
}
Пример #2
0
// Returns the amount of joysticks detected.
func GetNumJoysticks() int {
	return int(C.al_get_num_joysticks())
}