SvgaLib/doc/man6/mjoytest.6

111 lines
3.2 KiB
Groff

.TH mjoytest 3 "14 April 1998" "Svgalib 1.3.0" "Svgalib User Manual"
.SH NAME
mjoytest \- test the svgalib joystick package in graphics mode
.SH SYNOPSIS
.BI "mjoytest [-j " joystick "] [[-m] " "video mode" ]
.SH DESCRIPTION
This demo program utilizes joysticks
.BR 0 " and " 1
in graphics mode.
If you specify a
.I joystick
number, only this is used. The demo separates the screen in two parts where you
can move a cursor around with the resp. joystick. Pressing button
2 changes the color, pressing button 1 draws.
It also prints the current joystick position to the screen.
Internally the demo also shows the use of custom joystick handlers and how to
recalibrate a joystick in graphics mode (press key
.BR <1> " and " <2>
respectively.
After the demo runs and the joysticks are initialized it is possible to share the
joysticks with another application (as long as it releases the joysticks upon a VC
switch as well).
Pressing
.BR <Q>
exits.
.SH BUGS
After a vc switch the demo occasionally hangs in
.BR vga_waitevent (3)
not timing out (hence the joysticks block). It is
not clear if it is a conceptional problem or bug in
.BR vga_waitevent (3)
or the kernel.
Simply press any key to revive the demo.
.SH NOTES
This demo is part of svgalib and can be found in the
.I demos/
subdirectory of the original svgalib distribution. However, it is not installed in the system
by default, s.t. it is unclear where you can find it if your svgalib was installed by some
linux distribution. Even then, when you have the demo on your system, you probably won't have
the sources s.t. it is only of limited use for you.
In case of any such problem, simply get an svgalib distribution from the net. You even
don't need to install it. Just
.B make
in the
.I demos/
subdirecty. As of this writing,
.I svgalib-1.3.0.tar.gz
is the latest version and can be retrieved by ftp from
.IR "sunsite.unc.edu" " at " "/pub/Linux/libs/graphics"
and
.IR "tsx-11.mit.edu" " at " "/pub/linux/sources/libs"
which will most probably be mirrored by a site close to you.
.SH CAVEATS
The functions used by this demo are only available in ELF versions of svgalib. Due to backwards
compatibility issues it cannot be used with shared a.out libs.
.SH SEE ALSO
.BR svgalib (7),
.BR vgagl (7),
.BR libvga.config (5),
.BR threed (6),
.BR accel (6),
.BR bg_test (6),
.BR eventtest (6),
.BR forktest (6),
.BR fun (6),
.BR keytest (6),
.BR scrolltest (6),
.BR speedtest (6),
.BR spin (6),
.BR testaccel (6),
.BR testgl (6),
.BR testlinear (6),
.BR vgatest (6),
.BR plane (6),
.BR wrapdemo (6),
.BR vgatest (6),
.BR joytest (6),
.BR joystick_init (3),
.BR joystick_close (3),
.BR joystick_update (3),
.BR joystick_sethandler (3),
.BR joystick_setdefaulthandler (3),
.BR joystick_getnumaxes (3),
.BR joystick_getnumbuttons (3),
.BR joystick_getaxis (3),
.BR joystick_getbutton (3),
.BR joystick_button1 (3),
.BR joystick_getb1 (3),
.BR joystick_x (3),
.BR joystick_getx (3).
.SH AUTHOR
The svgalib joystick handler was mostly done by Daniel Engstr\\"om <daniel.engstrom@riksnett.no>.
Multiple joystick, VC switching support and code to glue it into svgalib by Michael Weller
<eowmob@exp-math.uni-essen.de>. Part of the code is based on code from C. Smith and
Vojtech Pavlik.