1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

fix(sdl): fix warning

This commit is contained in:
Gabor Kiss-Vamosi 2023-05-31 13:24:46 +02:00
parent dbecd26d28
commit 87de84dfbb

View File

@ -135,17 +135,17 @@ void _lv_sdl_mouse_handler(SDL_Event * event)
case SDL_FINGERUP:
indev_dev->left_button_down = false;
indev_dev->last_x = hor_res * event->tfinger.x / zoom;
indev_dev->last_y = ver_res * event->tfinger.y / zoom;
indev_dev->last_x = (int16_t)((float)hor_res * event->tfinger.x / zoom);
indev_dev->last_y = (int16_t)((float)ver_res * event->tfinger.y / zoom);
break;
case SDL_FINGERDOWN:
indev_dev->left_button_down = true;
indev_dev->last_x = hor_res * event->tfinger.x / zoom;
indev_dev->last_y = ver_res * event->tfinger.y / zoom;
indev_dev->last_x = (int16_t)((float)hor_res * event->tfinger.x / zoom);
indev_dev->last_y = (int16_t)((float)ver_res * event->tfinger.y / zoom);
break;
case SDL_FINGERMOTION:
indev_dev->last_x = hor_res * event->tfinger.x / zoom;
indev_dev->last_y = ver_res * event->tfinger.y / zoom;
indev_dev->last_x = (int16_t)((float)hor_res * event->tfinger.x / zoom);
indev_dev->last_y = (int16_t)((float)ver_res * event->tfinger.y / zoom);
break;
}
}