mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-25 09:15:43 +08:00
fix(anim): ignore large apparent animation duration (#9280)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
+4
-2
@@ -649,9 +649,11 @@ static void anim_timer(lv_timer_t * param)
|
||||
}
|
||||
|
||||
if(!state.anim_list_changed) {
|
||||
/*Restore the original time to see is there is over time.
|
||||
/*Restore the original time to see if there is over time, ignoring silly values.
|
||||
*Restore only if it wasn't changed in the `exec_cb` for some special reasons.*/
|
||||
if(a->act_time == act_time_before_exec) a->act_time = act_time_original;
|
||||
if(a->act_time == act_time_before_exec && act_time_original < a->duration * 2) {
|
||||
a->act_time = act_time_original;
|
||||
}
|
||||
|
||||
/*If the time is elapsed the animation is ready*/
|
||||
if(a->act_time >= a->duration) {
|
||||
|
||||
Reference in New Issue
Block a user