1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-02-04 07:13:00 +08:00

fix(indev): fix warnings when loggin coordinates is enabled

This commit is contained in:
PeterB 2023-07-10 12:26:23 +01:00
parent 375b3b5d3e
commit 645006e351

View File

@ -356,16 +356,16 @@ static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data)
/*Simple sanity check*/ /*Simple sanity check*/
if(data->point.x < 0) { if(data->point.x < 0) {
LV_LOG_WARN("X is %d which is smaller than zero", data->point.x); LV_LOG_WARN("X is %d which is smaller than zero", (int)data->point.x);
} }
if(data->point.x >= lv_disp_get_hor_res(i->driver->disp)) { if(data->point.x >= lv_disp_get_hor_res(i->driver->disp)) {
LV_LOG_WARN("X is %d which is greater than hor. res", data->point.x); LV_LOG_WARN("X is %d which is greater than hor. res", (int)data->point.x);
} }
if(data->point.y < 0) { if(data->point.y < 0) {
LV_LOG_WARN("Y is %d which is smaller than zero", data->point.y); LV_LOG_WARN("Y is %d which is smaller than zero", (int)data->point.y);
} }
if(data->point.y >= lv_disp_get_ver_res(i->driver->disp)) { if(data->point.y >= lv_disp_get_ver_res(i->driver->disp)) {
LV_LOG_WARN("Y is %d which is greater than ver. res", data->point.y); LV_LOG_WARN("Y is %d which is greater than ver. res", (int)data->point.y);
} }
/*Move the cursor if set and moved*/ /*Move the cursor if set and moved*/