diff options
-rw-r--r-- | src/emuMB.c | 8 | ||||
-rw-r--r-- | src/evdev.h | 12 |
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); |