예제 #1
0
파일: joystick.go 프로젝트: beoran/algo
// 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))
}