summaryrefslogtreecommitdiff
path: root/test/grail.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/grail.c')
-rw-r--r--test/grail.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/grail.c b/test/grail.c
index 3fe20ee..82de65f 100644
--- a/test/grail.c
+++ b/test/grail.c
@@ -128,11 +128,16 @@ static void gh_destroy(struct gesture_handler *gh)
128 gedev_destroy(&gh->dev); 128 gedev_destroy(&gh->dev);
129} 129}
130 130
131static void tp_sync(struct touch_engine *engine, touch_time_t time) 131static void tp_event(struct touch_engine *engine,
132 const struct input_event *ev)
133{
134}
135
136static void tp_sync(struct touch_engine *engine)
132{ 137{
133 struct gesture_handler *gh = engine->priv; 138 struct gesture_handler *gh = engine->priv;
134 struct touch_frame *frame = &engine->frame; 139 struct touch_frame *frame = &engine->frame;
135 gh_handle(gh, frame, time); 140 gh_handle(gh, frame, frame->time);
136} 141}
137 142
138static void loop_device(struct touch_dev *dev, int fd) 143static void loop_device(struct touch_dev *dev, int fd)
@@ -140,7 +145,7 @@ static void loop_device(struct touch_dev *dev, int fd)
140 struct gesture_handler gh; 145 struct gesture_handler gh;
141 struct touch_engine engine; 146 struct touch_engine engine;
142 gh_init(&gh); 147 gh_init(&gh);
143 touch_engine_init(&engine, tp_sync, &gh); 148 touch_engine_init(&engine, tp_event, tp_sync, &gh);
144 touch_engine_attach(&engine, dev); 149 touch_engine_attach(&engine, dev);
145 while (!touch_dev_idle(dev, fd, 5000)) 150 while (!touch_dev_idle(dev, fd, 5000))
146 touch_dev_pull(dev, fd); 151 touch_dev_pull(dev, fd);