summaryrefslogtreecommitdiff
path: root/src/hwstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hwstate.c')
-rw-r--r--src/hwstate.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/hwstate.c b/src/hwstate.c
index b29ee54..82a3a10 100644
--- a/src/hwstate.c
+++ b/src/hwstate.c
@@ -43,8 +43,8 @@ static void finish_packet(struct HWState *s, const struct Capabilities *caps,
43 s->evtime = syn->time.tv_usec / ms + syn->time.tv_sec * ms; 43 s->evtime = syn->time.tv_usec / ms + syn->time.tv_sec * ms;
44} 44}
45 45
46static int read_event(struct HWState *s, const struct Capabilities *caps, 46int hwstate_read(struct HWState *s, const struct Capabilities *caps,
47 const struct input_event *ev) 47 const struct input_event *ev)
48{ 48{
49 switch (ev->type) { 49 switch (ev->type) {
50 case EV_SYN: 50 case EV_SYN:
@@ -107,15 +107,3 @@ static int read_event(struct HWState *s, const struct Capabilities *caps,
107 } 107 }
108 return 0; 108 return 0;
109} 109}
110
111int modify_hwstate(struct HWState *s, struct MTDev *dev,
112 const struct Capabilities *caps)
113{
114 struct input_event ev;
115 while (!mtdev_empty(dev)) {
116 mtdev_get(dev, &ev);
117 if (read_event(s, caps, &ev))
118 return 1;
119 }
120 return 0;
121}