diff options
author | Zephaniah E. Hull <warp@aehallh.com> | 2006-04-08 17:23:06 +0000 |
---|---|---|
committer | Zephaniah E. Hull <warp@aehallh.com> | 2006-04-08 17:23:06 +0000 |
commit | c97fdb44493e55f3456222855293016a596ff56e (patch) | |
tree | ee32d366365e870a35ab04bdcd173d4a4b00f7e1 /src/evdev.c | |
parent | Unlibcwrap. Bump server version requirement. Bump to 1.1.0. (diff) | |
download | xf86-input-evdev-c97fdb44493e55f3456222855293016a596ff56e.tar.gz xf86-input-evdev-c97fdb44493e55f3456222855293016a596ff56e.tar.bz2 xf86-input-evdev-c97fdb44493e55f3456222855293016a596ff56e.zip |
Remove evdev_abs.c and evdev_rel.c. Added evdev_axes.c.
Change the calls to refer to EvdevAxes instead of Abs and Rel. Include
mipointer.h. (Fixes a compile error.) Remove an unused variable from
EvdevReadInput.
Removed evdev_abs.c and evdev_rel.c, added evdev_axes.c. Added count to rel
and abs. Moved btnMap from rel to the new axes. Shuffle some includes,
and include stdarg.h.
Removed.
New, a mix of rel and abs that should actually work in the rel case.
Rearrange include order. btnMap was moved from being part of rel to being
part of axes.
Removed.
Rearrange include order.
Rearrange include order.
NOTE: This commit has been compile tested, not run tested.
I have some other changes to make before I can do more heavy testing.
Diffstat (limited to 'src/evdev.c')
-rw-r--r-- | src/evdev.c | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/src/evdev.c b/src/evdev.c index ee35a26..7179c04 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -68,6 +68,7 @@ #include <xf86.h> #include <xf86Module.h> +#include <mipointer.h> #include <xf86_OSproc.h> @@ -83,7 +84,7 @@ static void EvdevReadInput(InputInfoPtr pInfo) { struct input_event ev; - int len, value; + int len; while (xf86WaitForInput (pInfo->fd, 0) > 0) { len = read(pInfo->fd, &ev, sizeof(ev)); @@ -95,16 +96,13 @@ EvdevReadInput(InputInfoPtr pInfo) break; } - /* Get the signed value, earlier kernels had this as unsigned */ - value = ev.value; - switch (ev.type) { case EV_REL: - EvdevRelProcess (pInfo, &ev); + EvdevAxesRelProcess (pInfo, &ev); break; case EV_ABS: - EvdevAbsProcess (pInfo, &ev); + EvdevAxesAbsProcess (pInfo, &ev); break; case EV_KEY: @@ -116,8 +114,7 @@ EvdevReadInput(InputInfoPtr pInfo) case EV_SYN: if (ev.code == SYN_REPORT) { - EvdevRelSyn (pInfo); - EvdevAbsSyn (pInfo); + EvdevAxesSyn (pInfo); /* EvdevBtnSyn (pInfo); */ /* EvdevKeySyn (pInfo); */ } @@ -144,10 +141,8 @@ EvdevProc(DeviceIntPtr device, int what) switch (what) { case DEVICE_INIT: - if (pEvdev->state.abs) - EvdevAbsInit (device); - if (pEvdev->state.rel) - EvdevRelInit (device); + if (pEvdev->state.axes) + EvdevAxesInit (device); if (pEvdev->state.btn) EvdevBtnInit (device); if (pEvdev->state.key) @@ -184,10 +179,8 @@ EvdevProc(DeviceIntPtr device, int what) device->public.on = TRUE; - if (pEvdev->state.abs) - EvdevAbsOn (device); - if (pEvdev->state.rel) - EvdevRelOn (device); + if (pEvdev->state.axes) + EvdevAxesOn (device); if (pEvdev->state.btn) EvdevBtnOn (device); if (pEvdev->state.key) @@ -205,10 +198,8 @@ EvdevProc(DeviceIntPtr device, int what) xf86RemoveSIGIOHandler (pInfo->fd); close (pInfo->fd); - if (pEvdev->state.abs) - EvdevAbsOff (device); - if (pEvdev->state.rel) - EvdevRelOff (device); + if (pEvdev->state.axes) + EvdevAxesOff (device); if (pEvdev->state.btn) EvdevBtnOff (device); if (pEvdev->state.key) @@ -304,8 +295,7 @@ EvdevNew(evdevDriverPtr driver, evdevDevicePtr device) /* XXX: Note, the order of these is important. */ - EvdevAbsNew (pInfo); - EvdevRelNew (pInfo); + EvdevAxesNew (pInfo); EvdevBtnNew (pInfo); if (device->state.can_grab) EvdevKeyNew (pInfo); @@ -448,6 +438,8 @@ EvdevCorePreInit(InputDriverPtr drv, IDevPtr dev, int flags) return NULL; } + + _X_EXPORT InputDriverRec EVDEV = { 1, "evdev", |