summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-02-09 19:51:57 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2008-02-09 19:51:57 +0100
commit079e56633f700b2a0e0240501d31e4a9e5007a4f (patch)
tree5e8c6959968cae788010c1cf289936e0134f190d /src
parentbf27c55a83a83fea4afe0499d1b2d592110e945a (diff)
acecad: improve handling of botched input versions
Diffstat (limited to 'src')
-rw-r--r--src/acecad.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/acecad.c b/src/acecad.c
index a522205..1e4cd02 100644
--- a/src/acecad.c
+++ b/src/acecad.c
@@ -29,6 +29,11 @@
#include <xorgVersion.h>
#define XORG_VERSION_BOTCHED XORG_VERSION_NUMERIC(1,4,0,0,0)
+#if XORG_VERSION_CURRENT >= XORG_VERSION_BOTCHED
+#define XORG_BOTCHED_INPUT 1
+#else
+#define XORG_BOTCHED_INPUT 0
+#endif
#define _ACECAD_C_
/*****************************************************************************
@@ -667,7 +672,7 @@ DeviceInit (DeviceIntPtr dev)
InitValuatorAxisStruct(dev,
0,
0, /* min val */
-#if XORG_VERSION_CURRENT == XORG_VERSION_BOTCHED
+#if XORG_BOTCHED_INPUT
screenInfo.screens[0]->width,
#else
priv->acecadMaxX, /* max val */
@@ -678,7 +683,7 @@ DeviceInit (DeviceIntPtr dev)
InitValuatorAxisStruct(dev,
1,
0, /* min val */
-#if XORG_VERSION_CURRENT == XORG_VERSION_BOTCHED
+#if XORG_BOTCHED_INPUT
screenInfo.screens[0]->height,
#else
priv->acecadMaxY, /* max val */
@@ -938,7 +943,7 @@ USBReadInput (LocalDevicePtr local)
if (prox)
{
-#if XORG_VERSION_CURRENT == XORG_VERSION_BOTCHED
+#if XORG_BOTCHED_INPUT
ConvertProc(local, 0, 3, x, y, 0, 0, 0, 0, &report_x, &report_y);
#else
report_x = x;