_OpenJoypad Scol 6.x or above required
Open a joypad and init the data callback.
Prototype :
fun [Chn fun [ObjJoypad u0 [I I] I [I I] I [I I I I] [I I] [I r1]] u1 u0] ObjJoypad
- Chn : a channel, typically the current channel
- fun [ObjJoypad u0 [I I] I [I I] I [I I I I] [I I] [I r1]] u1 : the reflex. The supplemental arguments are :
- [I I] : X-axis, usually the left-right movement of the joypad, Y-axis,
usually the forward-backward movement of the joypad
- I : Z-axis, often the throttle control. If the joystick does not have
this axis, the value is 0.
- [I I] : X-axis rotation. If the joystick does not have this axis, the
value is 0, Y-axis rotation. If the joystick does not have this axis, the
value is 0.
- I : Z-axis rotation (often called the rudder). If the joystick does not
have this axis, the value is 0.
- [I I I I] : Direction controllers, such as point-of-view hats. The
position is indicated in hundredths of a degree clockwise from north (away
from the user). The center position is normally reported as - 1. For
indicators that have only five positions, the value for a controller is
- 1, 0, 9,000, 18,000, or 27,000.
- [I I] : Two additional axis values (formerly called the u-axis and
v-axis) whose semantics depend on the joystick.
- [I r1] : Array of buttons.
- u0 : an user parameter, at your convenience
Return : ObjJoypad the new object or nil if error.
See also :
_CloseJoypad
Example :
Note
On MS Windows system only !