From: Ray Strode Date: Thu, 25 Sep 2008 20:44:15 +0000 (-0400) Subject: Force the Will(n) function to approach 1.0 X-Git-Tag: 0.6.0~109 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e8df97a886fc7be6e92b2c09338e950389ab175;p=thirdparty%2Fplymouth.git Force the Will(n) function to approach 1.0 It wasn't nearing 1.0 at the end of the boot cycle. --- diff --git a/src/plugins/splash/spinfinity/plugin.c b/src/plugins/splash/spinfinity/plugin.c index 17422e2e..95a995e3 100644 --- a/src/plugins/splash/spinfinity/plugin.c +++ b/src/plugins/splash/spinfinity/plugin.c @@ -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); diff --git a/src/plugins/splash/text/plugin.c b/src/plugins/splash/text/plugin.c index c737211c..c65224b5 100644 --- a/src/plugins/splash/text/plugin.c +++ b/src/plugins/splash/text/plugin.c @@ -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);