use JOY_NUM_AXES instead of 4 in joy_(get|set)_cal_vals (d1x r1.3, r1.4)
This commit is contained in:
parent
84c8953ddb
commit
d9b48e875d
|
@ -1,3 +1,8 @@
|
|||
2004-05-21 Matthew Mueller <donut@dakotacom.net>
|
||||
|
||||
* arch/dos/joyc.c, arch/linux/joystick.c: use JOY_NUM_AXES instead
|
||||
of 4 in joy_(get|set)_cal_vals (d1x r1.3, r1.4)
|
||||
|
||||
2004-05-21 Steven Mueller <diffusor@ugcs.caltech.edu>
|
||||
|
||||
* arch/include/joy.h, arch/linux/joydefs.c, arch/linux/joystick.c,
|
||||
|
|
|
@ -13,13 +13,16 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
|
||||
/*
|
||||
* $Source: /cvs/cvsroot/d2x/arch/dos/joyc.c,v $
|
||||
* $Revision: 1.4 $
|
||||
* $Author: bradleyb $
|
||||
* $Date: 2001-10-24 09:25:05 $
|
||||
* $Revision: 1.5 $
|
||||
* $Author: btb $
|
||||
* $Date: 2004-05-22 01:40:12 $
|
||||
*
|
||||
* Routines for joystick reading.
|
||||
*
|
||||
* $Log: not supported by cvs2svn $
|
||||
* Revision 1.4 2001/10/24 09:25:05 bradleyb
|
||||
* Moved input stuff to arch subdirs, as in d1x.
|
||||
*
|
||||
* Revision 1.3 2001/01/29 14:03:56 bradleyb
|
||||
* Fixed build, minor fixes
|
||||
*
|
||||
|
@ -234,7 +237,8 @@ void joy_get_cal_vals(int *axis_min, int *axis_center, int *axis_max)
|
|||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i<4; i++) {
|
||||
for (i = 0; i < JOY_NUM_AXES; i++)
|
||||
{
|
||||
axis_min[i] = joystick.axis_min[i];
|
||||
axis_center[i] = joystick.axis_center[i];
|
||||
axis_max[i] = joystick.axis_max[i];
|
||||
|
@ -245,7 +249,8 @@ void joy_set_cal_vals(int *axis_min, int *axis_center, int *axis_max)
|
|||
{
|
||||
int i;
|
||||
|
||||
for (i=0; i<4; i++) {
|
||||
for (i = 0; i < JOY_NUM_AXES; i++)
|
||||
{
|
||||
joystick.axis_min[i] = axis_min[i];
|
||||
joystick.axis_center[i] = axis_center[i];
|
||||
joystick.axis_max[i] = axis_max[i];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: joystick.c,v 1.3 2004-05-22 01:32:12 btb Exp $ */
|
||||
/* $Id: joystick.c,v 1.4 2004-05-22 01:40:14 btb Exp $ */
|
||||
/*
|
||||
*
|
||||
* Linux joystick support
|
||||
|
@ -111,7 +111,8 @@ void joy_set_cal_vals(int *axis_min, int *axis_center, int *axis_max)
|
|||
/* stpohle - this is already done in the "joy_init" function, so we don't need it in here.
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (i = 0; i < JOY_NUM_AXES; i++)
|
||||
{
|
||||
j_axis[i].center_val = axis_center[i];
|
||||
j_axis[i].min_val = axis_min[i];
|
||||
j_axis[i].max_val = axis_max[i];
|
||||
|
@ -125,7 +126,8 @@ void joy_get_cal_vals(int *axis_min, int *axis_center, int *axis_max) {
|
|||
int i;
|
||||
|
||||
//edited 05/18/99 Matt Mueller - we should return all axes instead of j_num_axes, since they are all given to us in joy_set_cal_vals ( and because checker complains :)
|
||||
for (i = 0; i < 4; i++) {
|
||||
for (i = 0; i < JOY_NUM_AXES; i++)
|
||||
{
|
||||
//end edit -MM
|
||||
axis_center[i] = j_axis[i].center_val;
|
||||
axis_min[i] = j_axis[i].min_val;
|
||||
|
|
Loading…
Reference in a new issue