mirror of
https://github.com/X11Libre/xf86-input-joystick.git
synced 2026-03-24 01:34:06 +00:00
use xf86{Add,Remove}EnabledDevice()
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
committed by
Peter Hutterer
parent
baf8bd4441
commit
60d0e9c451
@@ -147,7 +147,7 @@ jstkReadProc(InputInfoPtr pInfo)
|
||||
xf86Msg(X_WARNING, "JOYSTICK: Read failed. Deactivating device.\n");
|
||||
|
||||
if (pInfo->fd >= 0)
|
||||
RemoveEnabledDevice(pInfo->fd);
|
||||
xf86RemoveEnabledDevice(pInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -414,7 +414,7 @@ jstkDeviceControlProc(DeviceIntPtr pJstk,
|
||||
if (jstkOpenDevice(priv, FALSE) != -1) {
|
||||
pJstk->public.on = TRUE;
|
||||
pInfo->fd = priv->fd;
|
||||
AddEnabledDevice(pInfo->fd);
|
||||
xf86AddEnabledDevice(pInfo);
|
||||
} else return !Success;
|
||||
break;
|
||||
|
||||
@@ -437,7 +437,7 @@ jstkDeviceControlProc(DeviceIntPtr pJstk,
|
||||
}
|
||||
|
||||
if (pInfo->fd >= 0)
|
||||
RemoveEnabledDevice(pInfo->fd);
|
||||
xf86RemoveEnabledDevice(pInfo);
|
||||
if (!(pInfo->flags & XI86_SERVER_FD))
|
||||
pInfo->fd = -1;
|
||||
if (priv->close_proc)
|
||||
@@ -772,4 +772,3 @@ _X_EXPORT XF86ModuleData joystickModuleData = {
|
||||
};
|
||||
|
||||
/* vim: set filetype=c.doxygen ts=4 et: */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user