summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnrico Weigelt, metux IT consult <info@metux.net>2024-02-20 16:12:12 +0100
committerAlan Coopersmith <alan.coopersmith@oracle.com>2024-02-24 09:55:29 -0800
commita5f72befe25f4219e80e8ff1a5d2cd6e03307957 (patch)
tree6dd8728bdb5992109cd624ae794fd3e4084aa1ec
parentc8d19c805d1aa698452e4f51e1d86735a594a49f (diff)
stop using long deprecated xf86BlockSIGIO() and xf86UnblockSIGIO()HEADmaster
These functions have been replaced by input_lock() and input_unlock() about a decade ago and only exisiting as inlined wrappers. v2: increase required server version to 1.18.99.2 No need to support almost 1.5 decades old and unmaintained Xserver version, almost one decade is more than enough ;-) Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--configure.ac2
-rw-r--r--src/jstk_axis.c12
2 files changed, 7 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 3bf90ab..bba19ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,13 +45,13 @@ XORG_DEFAULT_OPTIONS
# Checks for extensions
XORG_DRIVER_CHECK_EXT(XINPUT, inputproto)
XORG_DRIVER_CHECK_EXT(XKB, kbproto)
# Checks for pkg-config packages
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.9.99.2] xproto $REQUIRED_MODULES)
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.18.99.2] xproto $REQUIRED_MODULES)
DRIVER_NAME=joystick
AC_SUBST([DRIVER_NAME])
# -----------------------------------------------------------------------------
# Configuration options
diff --git a/src/jstk_axis.c b/src/jstk_axis.c
index 3f3da6c..2f9793b 100644
--- a/src/jstk_axis.c
+++ b/src/jstk_axis.c
@@ -56,20 +56,20 @@ jstkAxisTimer(OsTimerPtr timer,
{
#define NEXTTIMER 15
DeviceIntPtr device = (DeviceIntPtr)arg;
InputInfoPtr pInfo = device->public.devicePrivate;
JoystickDevPtr priv = pInfo->private;
- int sigstate, i;
+ int i;
int nexttimer;
int movex,movey,movezx,movezy;
nexttimer = 0;
movex = movey = movezx = movezy = 0;
- sigstate = xf86BlockSIGIO();
+ input_lock();
for (i=0; i<MAXAXES; i++) if ((priv->axis[i].value != 0) &&
(priv->axis[i].type != JSTK_TYPE_NONE)) {
float p1 = 0.0f; /* Pixels to move cursor */
float p2 = 0.0f; /* Pixels to scroll */
float scale;
@@ -303,13 +303,13 @@ jstkAxisTimer(OsTimerPtr timer,
for (i=0; i<MAXBUTTONS; i++) priv->button[i].subpixel = 0.0f;
for (i=0; i<MAXAXES; i++) priv->axis[i].subpixel = 0.0f;
DBG(2, ErrorF("Stopping Axis Timer\n"));
}
- xf86UnblockSIGIO (sigstate);
+ input_unlock();
return nexttimer;
}
/***********************************************************************
*
@@ -461,18 +461,18 @@ jstkPWMAxisTimer(OsTimerPtr timer,
pointer arg)
{
DeviceIntPtr device = (DeviceIntPtr)arg;
InputInfoPtr pInfo = device->public.devicePrivate;
JoystickDevPtr priv = pInfo->private;
- int sigstate, i;
+ int i;
int nexttimer;
nexttimer = 0;
- sigstate = xf86BlockSIGIO();
+ input_lock();
for (i=0; i<MAXAXES; i++)
if (priv->axis[i].timer == timer) /* The timer handles only one axis! Find it. */
{
AXIS *axis;
axis = &priv->axis[i];
@@ -573,13 +573,13 @@ jstkPWMAxisTimer(OsTimerPtr timer,
DBG(2, ErrorF("Stopping PWM Axis %d Timer\n", i));
}
axis->oldvalue = axis->value;
break;
}
- xf86UnblockSIGIO (sigstate);
+ input_unlock();
return nexttimer;
}
/***********************************************************************
*