module Sdljoystick: sig endSdl.init must have been called
with the `JOYSTICK flag. This causes SDL to scan the system
for joysticks, and load appropriate drivers.exception SDLjoystick_exception of string
type t
val num_joysticks : unit -> intval name : int -> stringval open_joystick : int -> tSDLjoystick_exception if an error occurredval opened : int -> booltrue if joystick has been openedval index : t -> intval num_axes : t -> intval num_balls : t -> intval num_hats : t -> intval num_buttons : t -> int
Joystick state
|
val update : t -> unitSdljoystick.update
yourself and check the state of the joystick when you want joystick
information.val set_event_state : bool -> unitval get_event_state : unit -> booltype hat_value = int
val hat_centered : hat_valueval hat_up : hat_valueval hat_right : hat_valueval hat_down : hat_valueval hat_left : hat_valueval hat_rightup : hat_valueval hat_rightdown : hat_valueval hat_leftup : hat_valueval hat_leftdown : hat_valueval get_axis : t -> int -> intval get_hat : t -> int -> hat_valueval get_ball : t -> int -> int * intval get_button : t -> int -> boolval close : t -> unitSdljoystick.open_joystick