mjoytest (3)
test the svgalib joystick package in graphics mode
SYNOPSIS
DESCRIPTION
This demo program utilizes joysticks
0 and 1
in graphics mode.
If you specify a
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
<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
<Q>
exits.
BUGS
After a vc switch the demo occasionally hangs in
vga_waitevent (3)
not timing out (hence the joysticks block). It is
not clear if it is a conceptional problem or bug in
vga_waitevent (3)
or the kernel.
Simply press any key to revive the demo.
NOTES
This demo is part of svgalib and can be found in the
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
make
in the
demos/
subdirecty. As of this writing,
svgalib-1.3.0.tar.gz
is the latest version and can be retrieved by ftp from
sunsite.unc.edu at /pub/Linux/libs/graphics
and
tsx-11.mit.edu at /pub/linux/sources/libs
which will most probably be mirrored by a site close to you.
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.
SEE ALSO
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.
|