diff options
Diffstat (limited to 'share/man/man4/man4.i386/joy.4')
-rw-r--r-- | share/man/man4/man4.i386/joy.4 | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/share/man/man4/man4.i386/joy.4 b/share/man/man4/man4.i386/joy.4 index 039542c..c04d8db 100644 --- a/share/man/man4/man4.i386/joy.4 +++ b/share/man/man4/man4.i386/joy.4 @@ -16,7 +16,8 @@ the PC joystick. This device may be opened by only one process at a time. .Pp The joystick status is read from a structure via a read() -call. The structure is defined in the header file as follows: +call. +The structure is defined in the header file as follows: .Pp .Bd -literal -offset indent struct joystick { @@ -33,12 +34,14 @@ perl -e 'open(JOY,"/dev/joy0")||die;while(1) .br {sysread(JOY,$x,16);@j=unpack("iiii",$x);print "@j\\n";sleep(1);}' .Ss ioctl calls -Several ioctl() calls are also available. They take an argument of +Several ioctl() calls are also available. +They take an argument of type int * .Bl -tag -width JOY_SET_X_OFFSET .It Dv JOY_SETTIMEOUT Fa int *limit Set the time limit (in microseconds) for reading the joystick -status. Setting a value +status. +Setting a value too small may prevent to get correct values for the positions (which are then set to -2147483648), however this can be useful if one is only interested by the buttons status. |