Пример #1
0
// Gets the state of the joystick
func (self *Joystick) GetState() *JoystickState {
	state := &JoystickState{}
	C.al_get_joystick_state(self.handle, state.toC())
	return state
}
Пример #2
0
func (j *Joystick) GetJoystickState() *JoystickState {
	js := new(C.ALLEGRO_JOYSTICK_STATE)
	C.al_get_joystick_state((*C.ALLEGRO_JOYSTICK)(unsafe.Pointer(j)), js)
	return (*JoystickState)(unsafe.Pointer(js))
}