mjoytest(6)

NAME

mjoytest - test the svgalib joystick package in graphics
mode

SYNOPSIS

mjoytest [-j joystick] [[-m] video mode]

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 applica
tion (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_wait event(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 distri
bution 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 mir rored 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

svgalib(7), vgagl(7), libvga.config(5), threed(6), accel(6), bg_test(6), eventtest(6), forktest(6), fun(6), keytest(6), scrolltest(6), speedtest(6), spin(6), testac cel(6), testgl(6), testlinear(6), vgatest(6), plane(6), wrapdemo(6), vgatest(6), joytest(6), joystick_init(3), joystick_close(3), joystick_update(3), joy stick_sethandler(3), joystick_setdefaulthandler(3), joy stick_getnumaxes(3), joystick_getnumbuttons(3), joy stick_getaxis(3), joystick_getbutton(3), joystick_but ton1(3), joystick_getb1(3), joystick_x(3), joy stick_getx(3).

AUTHOR

The svgalib joystick handler was mostly done by Daniel
Engstr
stick, 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.
Copyright © 2010-2025 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout