- Fixed joystick support on the x11 driver. Updated docs.
This commit is contained in:
parent
227b43b119
commit
fa14de2a59
|
@ -8,7 +8,7 @@ all: Makefile
|
||||||
.FORCED: all
|
.FORCED: all
|
||||||
|
|
||||||
Makefile: configure
|
Makefile: configure
|
||||||
./configure --enable-maintainer-mode --prefix=$(HOME)/quake2 --disable-joystick
|
./configure --enable-maintainer-mode --prefix=$(HOME)/quake2
|
||||||
|
|
||||||
configure: Makefile.in configure.in config.h.in
|
configure: Makefile.in configure.in config.h.in
|
||||||
autoconf
|
autoconf
|
||||||
|
|
13
README
13
README
|
@ -5,7 +5,7 @@ Compiling
|
||||||
---------
|
---------
|
||||||
|
|
||||||
If you are checking this out from CVS, run ``./bootstrap'' first to set
|
If you are checking this out from CVS, run ``./bootstrap'' first to set
|
||||||
up configure. You will need autoconf 2.50, automake 1.8, libtool 1.4,
|
up configure. You will need autoconf 2.50, automake 1.6, libtool 1.4,
|
||||||
or greater. Then follow the instructions in INSTALL.
|
or greater. Then follow the instructions in INSTALL.
|
||||||
|
|
||||||
When specifying locations to arguments like --with-svgalib (i.e. all the
|
When specifying locations to arguments like --with-svgalib (i.e. all the
|
||||||
|
@ -20,12 +20,11 @@ the paths relative to the given path.
|
||||||
Installing the game data
|
Installing the game data
|
||||||
------------------------
|
------------------------
|
||||||
|
|
||||||
The game data is searched for in ./baseq2/ and in
|
The game data is searched for in ${prefix}/share/quake2/baseq2/ (which by
|
||||||
${prefix}/share/quake2/baseq2/ (which by default is
|
default is /usr/local/share/quake2/baseq2/). If, when you start the game,
|
||||||
/usr/local/share/quake2/baseq2/). If you get an error that quake2 can't
|
you get an error that pics/colormap.pcx cannot be found, it means that
|
||||||
find pics/colormap.pcx, it means that it can't find your pak0.pak. Check
|
pak0.pak is not in the game data path. Check what prefix you gave to
|
||||||
what prefix you gave to configure, and make sure you have pak0.pak in the
|
configure, and make sure you have pak0.pak in the right directory.
|
||||||
right directory.
|
|
||||||
|
|
||||||
Save Games
|
Save Games
|
||||||
----------
|
----------
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
dnl Process this file with autoconf to produce a configure script.
|
|
||||||
|
|
||||||
dnl stick the revision info into the resulting configure script
|
dnl stick the revision info into the resulting configure script
|
||||||
AC_REVISION($Revision$) dnl
|
AC_REVISION($Revision$) dnl
|
||||||
AC_PREREQ(2.50)
|
AC_PREREQ(2.50)
|
||||||
|
|
||||||
AC_INIT(quake2, 0.2.3, quake2-devel@lists.quakeforge.net)
|
AC_INIT(quake2, 0.3, quake2-devel@lists.quakeforge.net)
|
||||||
AC_CONFIG_AUX_DIR(.)
|
AC_CONFIG_AUX_DIR(.)
|
||||||
AC_CONFIG_SRCDIR(src/main.c)
|
AC_CONFIG_SRCDIR(src/main.c)
|
||||||
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
SUBDIRS = ctf
|
SUBDIRS = ctf
|
||||||
|
|
||||||
EXTRA_DIST = README.* *.txt
|
EXTRA_DIST = README.Solaris README.axp README.install README.joystick \
|
||||||
|
README.linux README.sdl README.solaris README.sound \
|
||||||
|
TODO-ctf.txt changes-ctf.txt changes.txt joystick.txt readme.txt
|
||||||
|
|
|
@ -1,16 +1,26 @@
|
||||||
The joystick should function on all compatible SDL platforms using the SDL
|
Quake2Forge joystick
|
||||||
input routines as well as on Linux using the kernel joystick API. If you want
|
====================
|
||||||
to build with joystick support (enabled by default) then add --enable-joystick
|
|
||||||
to the configure command line arguments. Use --disable-joystick to build
|
|
||||||
without joystick support.
|
|
||||||
|
|
||||||
The joystick obeys the same freelook/strafe ruls as the mouse. You can set
|
The joystick should function with all Linux kernels using the kernel
|
||||||
|
joystick API, in the soft, softx, and glx video refreshers.
|
||||||
|
|
||||||
|
The SDL video refreshers softsdl and sdlgl use the SDL joystick API.
|
||||||
|
|
||||||
|
Use --disable-joystick as an argument to configure to build without joystick
|
||||||
|
support.
|
||||||
|
|
||||||
|
The joystick obeys the same freelook/strafe rules as the mouse. You can set
|
||||||
these in the options menu.
|
these in the options menu.
|
||||||
|
|
||||||
There are four cvars which can be set on the command line for the joystick:
|
There are four cvars which can be set on the command line for the joystick:
|
||||||
joystick_invert_y [1] if set to zero pulling back on the joystick points
|
|
||||||
the targeting recticle downwards
|
joystick_invert_y [default 1] if set to zero pulling back on the joystick
|
||||||
joystick_axis_horz [0] sets the axis which controls left-right movement
|
points the targeting recticle downwards
|
||||||
joystick_axis_vert [1] sets the axis which controls up-down movement
|
|
||||||
joystick_throttle [3] sets the axis which controls the fore-backward motion
|
joystick_axis_horz [default 0] sets the axis which controls left-right
|
||||||
(if freelook is true)
|
movement
|
||||||
|
|
||||||
|
joystick_axis_vert [default 1] sets the axis which controls up-down movement
|
||||||
|
|
||||||
|
joystick_throttle [default 3] sets the axis which controls the
|
||||||
|
fore-backward motion (if freelook is true)
|
||||||
|
|
|
@ -12,6 +12,8 @@ The currently supported list of drivers are:
|
||||||
oss -- OSS from Linux 2.4 and earlier, and some BSDs
|
oss -- OSS from Linux 2.4 and earlier, and some BSDs
|
||||||
alsa -- ALSA 0.9 from Linux 2.6 onwards
|
alsa -- ALSA 0.9 from Linux 2.6 onwards
|
||||||
ao -- libao audio output library
|
ao -- libao audio output library
|
||||||
|
sdl -- SDL audio
|
||||||
|
solaris -- solaris native audio
|
||||||
|
|
||||||
Each driver uses the snddevice cvar in different ways:
|
Each driver uses the snddevice cvar in different ways:
|
||||||
|
|
||||||
|
@ -19,6 +21,11 @@ Each driver uses the snddevice cvar in different ways:
|
||||||
alsa uses the pcm name, e.g. default or plughw:0,0
|
alsa uses the pcm name, e.g. default or plughw:0,0
|
||||||
ao uses the name of the backend, e.g. oss or alsa09
|
ao uses the name of the backend, e.g. oss or alsa09
|
||||||
|
|
||||||
|
The sdl driver does not require a snddevice.
|
||||||
|
|
||||||
|
The ao driver will try the default backend (i.e. the one set in
|
||||||
|
/etc/libao.conf or ~/.libao) if the named snddevice does not exist.
|
||||||
|
|
||||||
e.g.:
|
e.g.:
|
||||||
|
|
||||||
quake2 +set snddriver oss +set snddevice /dev/dsp
|
quake2 +set snddriver oss +set snddevice /dev/dsp
|
||||||
|
|
|
@ -1 +1,4 @@
|
||||||
EXTRA_DIST = *.gif *.html
|
EXTRA_DIST = q2ctf.html \
|
||||||
|
admin.gif adminset.gif automac.gif ghost.jpg grapple.jpg \
|
||||||
|
layout.jpg mainctf_back.jpg menu.gif say_team.gif \
|
||||||
|
stats.jpg tech1.gif tech2.gif tech3.gif tech4.gif
|
||||||
|
|
|
@ -289,7 +289,7 @@ static cvar_t *vid_ypos; // Y coordinate of window position
|
||||||
#ifdef HAVE_JOYSTICK
|
#ifdef HAVE_JOYSTICK
|
||||||
static cvar_t *in_joystick;
|
static cvar_t *in_joystick;
|
||||||
static qboolean joystick_avail = false;
|
static qboolean joystick_avail = false;
|
||||||
static int joy_fd, jx, jy, jt;
|
static int joy_fd = -1, jx, jy, jt;
|
||||||
static cvar_t *j_invert_y;
|
static cvar_t *j_invert_y;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -349,6 +349,7 @@ void init_joystick() {
|
||||||
|
|
||||||
for (i = 0; i < pglob.gl_pathc; i++) {
|
for (i = 0; i < pglob.gl_pathc; i++) {
|
||||||
ri.Con_Printf(PRINT_ALL, "Trying joystick dev %s\n", pglob.gl_pathv[i]);
|
ri.Con_Printf(PRINT_ALL, "Trying joystick dev %s\n", pglob.gl_pathv[i]);
|
||||||
|
joy_fd = open(pglob.gl_pathv[i], O_RDONLY | O_NONBLOCK);
|
||||||
if (joy_fd == -1) {
|
if (joy_fd == -1) {
|
||||||
ri.Con_Printf(PRINT_ALL, "Error opening joystick dev %s\n", pglob.gl_pathv[i]);
|
ri.Con_Printf(PRINT_ALL, "Error opening joystick dev %s\n", pglob.gl_pathv[i]);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue