diff options
author | raveit65 <[email protected]> | 2018-08-24 09:00:56 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-09-09 16:59:39 +0200 |
commit | 3eb44db74e80fc18f9e53793c85fb1c9ebdfa106 (patch) | |
tree | 7ca41ebc4253964825247e6fe476a98486c6908d | |
parent | dbd37df02231b8f2fb57b064c05c4a6886ee0357 (diff) | |
download | mate-screensaver-3eb44db74e80fc18f9e53793c85fb1c9ebdfa106.tar.bz2 mate-screensaver-3eb44db74e80fc18f9e53793c85fb1c9ebdfa106.tar.xz |
fade: fix fade computation math
commit https://github.com/mate-desktop/mate-screensaver/commit/599bc81
changed the fade time out to be less than a 1000ms.
Unfortunately, this broke the fade because the math for computing
the number of fade steps used integer arithmetic,
and performed a division by a 1000.
https://bugzilla.gnome.org/show_bug.cgi?id=672583
origin commit:
https://gitlab.gnome.org/GNOME/gnome-screensaver/commit/7e2085a
-rw-r--r-- | src/gs-fade.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gs-fade.c b/src/gs-fade.c index 156d7e2..8e9a858 100644 --- a/src/gs-fade.c +++ b/src/gs-fade.c @@ -755,7 +755,7 @@ gs_fade_start (GSFade *fade, { guint num_steps; - num_steps = (fade->priv->timeout / 1000) * steps_per_sec; + num_steps = (fade->priv->timeout / 1000.0) * steps_per_sec; msecs_per_step = 1000 / steps_per_sec; fade->priv->alpha_per_iter = 1.0 / (gdouble)num_steps; |