Skip to content

Commit b8009d7

Browse files
authored
Merge pull request lvgl#560 from kisvegabor/indev_data_init
lv_indev: init data before calling of indev_read
2 parents 2c8cf7d + 073e99e commit b8009d7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lv_hal/lv_hal_indev.c

+2
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,8 @@ bool lv_indev_read(lv_indev_t * indev, lv_indev_data_t * data)
110110
bool cont = false;
111111

112112
if(indev->driver.read) {
113+
memset(data, 0, sizeof(data));
114+
data->state = LV_INDEV_STATE_REL;
113115
data->user_data = indev->driver.user_data;
114116

115117
LV_LOG_TRACE("idnev read started");

0 commit comments

Comments
 (0)