summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2007-08-23 19:10:34 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2007-08-23 19:10:34 +0000
commit410922b09d9445da016a5d113722eb730cda4738 (patch)
tree41ace21003839d290026f9a2c8c2f86f6a88bb4f
parent3c940eed4bbda87cb4878dd984e49b874802d759 (diff)
Add compatibility with new XInput API. From Blair Sadewitz.
-rw-r--r--driver/openbsd-input-ws/src/ws.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/driver/openbsd-input-ws/src/ws.c b/driver/openbsd-input-ws/src/ws.c
index 6467e1232..c3ffe53ed 100644
--- a/driver/openbsd-input-ws/src/ws.c
+++ b/driver/openbsd-input-ws/src/ws.c
@@ -13,7 +13,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $OpenBSD: ws.c,v 1.3 2007/07/27 06:49:39 matthieu Exp $ */
+/* $OpenBSD: ws.c,v 1.4 2007/08/23 19:10:33 matthieu Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -371,8 +371,18 @@ wsProc(DeviceIntPtr pWS, int what)
map[i + 1] = i + 1;
InitPointerDeviceStruct((DevicePtr)pWS, map,
min(priv->buttons, NBUTTONS),
- miPointerGetMotionEvents, wsControlProc,
- miPointerGetMotionBufferSize());
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
+ miPointerGetMotionEvents,
+#else
+ GetMotionHistory,
+#endif
+ wsControlProc,
+#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) == 0
+ miPointerGetMotionBufferSize()
+#else
+ GetMotionHistorySize(), NAXES
+#endif
+ );
xf86InitValuatorAxisStruct(pWS, 0, 0, -1, 1, 0, 1);
xf86InitValuatorDefaults(pWS, 0);