summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-05-31 17:52:43 -0700
committerPeter Hutterer <peter.hutterer@who-t.net>2016-09-06 13:51:21 +1000
commitbb8bde7456def4186f9a4a0a9f98d53c949e1450 (patch)
treed2a1c7bb8691368db6e70a2b2e741172330213f7
parent7b1267f7f18c478d3dc34a7668eaefa402815891 (diff)
Support XINPUT ABI 24 (remove select mask from block/wakeup handlers)
The evdev driver wasn't using the select mask arguments, so this change just involves adjusting the argument lists. Signed-off-by: Keith Packard <keithp@keithp.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--src/emuMB.c8
-rw-r--r--src/evdev.h12
2 files changed, 12 insertions, 8 deletions
diff --git a/src/emuMB.c b/src/emuMB.c
index 94e50c4..d1777aa 100644
--- a/src/emuMB.c
+++ b/src/emuMB.c
@@ -268,9 +268,7 @@ EvdevMBEmuFilterEvent(InputInfoPtr pInfo, int button, BOOL press)
}
-void EvdevMBEmuWakeupHandler(pointer data,
- int i,
- pointer LastSelectMask)
+void EvdevMBEmuWakeupHandler(WAKEUP_HANDLER_ARGS)
{
InputInfoPtr pInfo = (InputInfoPtr)data;
EvdevPtr pEvdev = (EvdevPtr)pInfo->private;
@@ -284,9 +282,7 @@ void EvdevMBEmuWakeupHandler(pointer data,
}
}
-void EvdevMBEmuBlockHandler(pointer data,
- struct timeval **waitTime,
- pointer LastSelectMask)
+void EvdevMBEmuBlockHandler(BLOCK_HANDLER_ARGS)
{
InputInfoPtr pInfo = (InputInfoPtr) data;
EvdevPtr pEvdev= (EvdevPtr) pInfo->private;
diff --git a/src/evdev.h b/src/evdev.h
index 0ebcfa0..c506296 100644
--- a/src/evdev.h
+++ b/src/evdev.h
@@ -71,6 +71,14 @@
#define HAVE_THREADED_INPUT 1
#endif
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 24
+#define BLOCK_HANDLER_ARGS void *data, void *waitTime
+#define WAKEUP_HANDLER_ARGS void *data, int i
+#else
+#define BLOCK_HANDLER_ARGS pointer data, struct timeval **waitTime, pointer LastSelectMask
+#define WAKEUP_HANDLER_ARGS void *data, int i, pointer LastSelectMask
+#endif
+
#define EVDEV_MAXBUTTONS 32
#define EVDEV_MAXQUEUE 32
@@ -264,8 +272,8 @@ unsigned int EvdevUtilButtonEventToButtonNumber(EvdevPtr pEvdev, int code);
/* Middle Button emulation */
int EvdevMBEmuTimer(InputInfoPtr);
BOOL EvdevMBEmuFilterEvent(InputInfoPtr, int, BOOL);
-void EvdevMBEmuWakeupHandler(pointer, int, pointer);
-void EvdevMBEmuBlockHandler(pointer, struct timeval**, pointer);
+void EvdevMBEmuWakeupHandler(WAKEUP_HANDLER_ARGS);
+void EvdevMBEmuBlockHandler(BLOCK_HANDLER_ARGS);
void EvdevMBEmuPreInit(InputInfoPtr);
void EvdevMBEmuOn(InputInfoPtr);
void EvdevMBEmuFinalize(InputInfoPtr);