]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[throbber] Properly finish animation before stopping seat-rework
authorRay Strode <rstrode@redhat.com>
Fri, 25 Sep 2009 20:39:27 +0000 (16:39 -0400)
committerRay Strode <rstrode@redhat.com>
Mon, 28 Sep 2009 21:55:35 +0000 (17:55 -0400)
I can't say I have any idea what I was trying to do before
but it's clearly bogus.

src/libplybootsplash/ply-throbber.c

index 3e463d36ebc426fed85e726f9e18a336ac068af8..9131e7158944eecb236f9cd242521774d68d0e61 100644 (file)
@@ -68,7 +68,7 @@ struct _ply_throbber
 
   long x, y;
   long width, height;
-  double start_time, previous_time, now;
+  double start_time, now;
 
   int frame_number;
   uint32_t is_stopped : 1;
@@ -145,9 +145,8 @@ animate_at_time (ply_throbber_t *throbber,
 
   if (throbber->stop_trigger != NULL)
     {
-      if ((time - throbber->previous_time) >= 2 * M_PI)
-        throbber->frame_number = number_of_frames - 1;
-      should_continue = false;
+      if (throbber->frame_number == number_of_frames - 1)
+        should_continue = false;
     }
 
   frames = (ply_image_t * const *) ply_array_get_elements (throbber->frames);
@@ -169,7 +168,6 @@ on_timeout (ply_throbber_t *throbber)
 {
   double sleep_time;
   bool should_continue;
-  throbber->previous_time = throbber->now;
   throbber->now = ply_get_timestamp ();
 
 #ifdef REAL_TIME_ANIMATION