mirror of
https://github.com/openharmony/third_party_mtdev.git
synced 2026-07-19 19:13:33 -04:00
Signed-off-by:wanghao505<wanghao505@huawei.com>
Signed-off-by: wanghao505 <wanghao505@huawei.com> Change-Id: Ia4c639b2886004f5ec769a8e6482794c85ad61d0
This commit is contained in:
+3
-1
@@ -358,8 +358,10 @@ int mtdev_init(struct mtdev *dev)
|
||||
dev->state = calloc(1, sizeof(struct mtdev_state));
|
||||
if (!dev->state)
|
||||
return -ENOMEM;
|
||||
for (i = 0; i < DIM_FINGER; i++)
|
||||
for (i = 0; i < DIM_FINGER; i++) {
|
||||
dev->state->data[i].tracking_id = MT_ID_NULL;
|
||||
dev->state->data[i].tool_type = MT_ID_NULL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -49,6 +49,8 @@ struct mtdev_slot {
|
||||
int tracking_id;
|
||||
int pressure;
|
||||
int distance;
|
||||
int tool_x;
|
||||
int tool_y;
|
||||
};
|
||||
|
||||
static inline int get_sval(const struct mtdev_slot *slot, int ix)
|
||||
|
||||
Reference in New Issue
Block a user