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

fix(anim): fix lv_anim_set_repeat_count configuration parameter may be truncated

Signed-off-by: bailinjiang <915290475@qq.com>
This commit is contained in:
bailinjiang 2024-03-26 12:20:46 +08:00 committed by Neo Xu
parent 150d1a1d37
commit 6e3f6866cb
2 changed files with 4 additions and 4 deletions

View File

@ -94,7 +94,7 @@ void lv_animimg_set_duration(lv_obj_t * obj, uint32_t duration)
lv_anim_set_playback_delay(&animimg->anim, duration);
}
void lv_animimg_set_repeat_count(lv_obj_t * obj, uint32_t count)
void lv_animimg_set_repeat_count(lv_obj_t * obj, uint16_t count)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
lv_animimg_t * animimg = (lv_animimg_t *)obj;
@ -126,7 +126,7 @@ uint32_t lv_animimg_get_duration(lv_obj_t * obj)
return lv_anim_get_time(&animimg->anim);
}
uint32_t lv_animimg_get_repeat_count(lv_obj_t * obj)
uint16_t lv_animimg_get_repeat_count(lv_obj_t * obj)
{
LV_ASSERT_OBJ(obj, MY_CLASS);
lv_animimg_t * animimg = (lv_animimg_t *)obj;

View File

@ -93,7 +93,7 @@ void lv_animimg_set_duration(lv_obj_t * img, uint32_t duration);
* @param img pointer to an animation image object
* @param count the number of times to repeat the animation
*/
void lv_animimg_set_repeat_count(lv_obj_t * img, uint32_t count);
void lv_animimg_set_repeat_count(lv_obj_t * img, uint16_t count);
/*=====================
* Getter functions
@ -125,7 +125,7 @@ uint32_t lv_animimg_get_duration(lv_obj_t * img);
* @param img pointer to an animation image object
* @return the repeat count
*/
uint32_t lv_animimg_get_repeat_count(lv_obj_t * img);
uint16_t lv_animimg_get_repeat_count(lv_obj_t * img);
#endif /*LV_USE_ANIMIMG*/