mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-08 13:38:45 +02:00
Force the Will(n) function to approach 1.0
It wasn't nearing 1.0 at the end of the boot cycle.
This commit is contained in:
parent
ffa357bf17
commit
3e8df97a88
2 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue