summaryrefslogtreecommitdiff
path: root/src/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/common.h')
-rw-r--r--src/common.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/common.h b/src/common.h
index 2ec8eb8..80a3d6e 100644
--- a/src/common.h
+++ b/src/common.h
@@ -87,6 +87,14 @@ static inline int bitcount(unsigned v)
87/* robust system ioctl calls */ 87/* robust system ioctl calls */
88#define SYSCALL(call) while (((call) == -1) && (errno == EINTR)) 88#define SYSCALL(call) while (((call) == -1) && (errno == EINTR))
89 89
90/* To be compatible to the original, non-opaque mtdev API, we can only use 11
91 * axes in the basic struct. Everything else is hidden in the state, see the
92 * use of dev->abs[idx] vs dev->state->ext_abs[idx]
93 *
94 * See MT_ABS_SIZE in include/mtdev.h
95 */
96#define LEGACY_API_NUM_MT_AXES 11
97
90/** 98/**
91 * struct mtdev - represents an input MT device 99 * struct mtdev - represents an input MT device
92 * @has_mtdata: true if the device has MT capabilities 100 * @has_mtdata: true if the device has MT capabilities
@@ -105,9 +113,9 @@ static inline int bitcount(unsigned v)
105struct mtdev { 113struct mtdev {
106 int has_mtdata; 114 int has_mtdata;
107 int has_slot; 115 int has_slot;
108 int has_abs[11]; 116 int has_abs[LEGACY_API_NUM_MT_AXES];
109 struct input_absinfo slot; 117 struct input_absinfo slot;
110 struct input_absinfo abs[11]; 118 struct input_absinfo abs[LEGACY_API_NUM_MT_AXES];
111 struct mtdev_state *state; 119 struct mtdev_state *state;
112}; 120};
113 121