s/MAX_DEVICES/MAXDEVICES/ updates.

The number of input devices is MAXDEVICES, not MAX_DEVICES (f781a752e6)
Two comments updated to refer to MAXDEVICES.

MAX_FUNCS in sigio.c was set to 16 if MAX_DEVICES was undefined. If more
than 15 physical input devices were present, this could result in a
failure to install the SIGIO handler for any device above 15.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
Peter Hutterer 2009-07-06 11:04:47 +10:00
parent 183c075d2f
commit b773b4e8e0
3 changed files with 5 additions and 5 deletions

View File

@ -75,11 +75,11 @@
# define O_ASYNC FASYNC # define O_ASYNC FASYNC
#endif #endif
#ifdef MAX_DEVICES #ifdef MAXDEVICES
/* MAX_DEVICES represents the maximimum number of input devices usable /* MAXDEVICES represents the maximimum number of input devices usable
* at the same time plus one entry for DRM support. * at the same time plus one entry for DRM support.
*/ */
# define MAX_FUNCS (MAX_DEVICES + 1) # define MAX_FUNCS (MAXDEVICES + 1)
#else #else
# define MAX_FUNCS 16 # define MAX_FUNCS 16
#endif #endif

View File

@ -119,7 +119,7 @@ typedef struct _InputClients {
* OtherInputMasks struct and exactly one InputClients struct hanging off * OtherInputMasks struct and exactly one InputClients struct hanging off
* inputClients. Each further client appends to the inputClients list. * inputClients. Each further client appends to the inputClients list.
* Each Mask field is per-device, with the device id as the index. * Each Mask field is per-device, with the device id as the index.
* Exception: for non-device events (Presence events), the MAX_DEVICES * Exception: for non-device events (Presence events), the MAXDEVICES
* deviceid is used. * deviceid is used.
*/ */
typedef struct _OtherInputMasks { typedef struct _OtherInputMasks {

View File

@ -51,7 +51,7 @@ in this Software without prior written authorization from The Open Group.
# include "picturestr.h" # include "picturestr.h"
#endif #endif
# include "inputstr.h" /* for MAX_DEVICES */ # include "inputstr.h"
/* per-screen private data */ /* per-screen private data */
static int miDCScreenKeyIndex; static int miDCScreenKeyIndex;