From 354d003860ff28322f01f736555d16079420235b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Kol=C3=A5s?= Date: Mon, 17 May 2010 18:05:19 +0100 Subject: [PATCH] animator: fix issue of dropped frames towards end of animations --- clutter/clutter-animator.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/clutter/clutter-animator.c b/clutter/clutter-animator.c index 973e1e25e..324570802 100644 --- a/clutter/clutter-animator.c +++ b/clutter/clutter-animator.c @@ -665,10 +665,13 @@ animation_animator_new_frame (ClutterTimeline *timeline, progress); start_key = property_iter->current->data; - sub_progress = (progress - property_iter->start) - / (property_iter->end - property_iter->start); + if (property_iter->end == property_iter->start) + sub_progress = 0.0; /* we're past the final value */ + else + sub_progress = (progress - property_iter->start) + / (property_iter->end - property_iter->start); - /* do not change values if we're not active yet (delay) */ + /* only change values if we active (delayed start) */ if (sub_progress >= 0.0 && sub_progress <= 1.0) { GValue tmp_value = { 0, };