]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Force the Will(n) function to approach 1.0
authorRay Strode <rstrode@redhat.com>
Thu, 25 Sep 2008 20:44:15 +0000 (16:44 -0400)
committerRay Strode <rstrode@redhat.com>
Mon, 29 Sep 2008 03:40:29 +0000 (23:40 -0400)
It wasn't nearing 1.0 at the end of the boot
cycle.

src/plugins/splash/spinfinity/plugin.c
src/plugins/splash/text/plugin.c

index 17422e2e9f3ffd52d4c1029b770695239bbb1803..95a995e3b9966165fdbb4f061850fff8b6788650 100644 (file)
@@ -448,7 +448,7 @@ on_boot_progress (ply_boot_splash_plugin_t *plugin,
 
   /* Fun made-up smoothing function to make the growth asymptotic:
    * fraction(time,estimate)=1-2^(-(time^1.45)/estimate) */
-  percent_done = 1.0 - pow (2.0, -pow (duration, 1.45) / total_duration);
+  percent_done = 1.0 - pow (2.0, -pow (duration, 1.45) / total_duration) * (1.0 - percent_done);
 
   ply_progress_bar_set_percent_done (plugin->progress_bar, percent_done);
   ply_progress_bar_draw (plugin->progress_bar);
index c737211c409eb65c61c321484036659bf16b77cc..c65224b5437188b6d44d1cf054e7588f4696af49 100644 (file)
@@ -277,7 +277,7 @@ on_boot_progress (ply_boot_splash_plugin_t *plugin,
   total_duration = duration / percent_done;
 
   /* Hi Will! */
-  percent_done = 1.0 - pow (2.0, -pow (duration, 1.45) / total_duration);
+  percent_done = 1.0 - pow (2.0, -pow (duration, 1.45) / total_duration) * (1.0 - percent_done);
 
   ply_text_progress_bar_set_percent_done (plugin->progress_bar, percent_done);
   ply_text_progress_bar_draw (plugin->progress_bar);