forge
Explore
Log in

Don't you dare go Hollow

Clamp animation slowdown to sane values

Browse files at this commit

d8dcadc5b279c11e8cb8d1b0b064cc2b62c04099Ivan MolodetskikhParent: 6424a27
src/main.rsmodified+1 -1
@@ -180,7 +180,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
180 let slowdown = if config.animations.off {180 let slowdown = if config.animations.off {
181 0.181 0.
182 } else {182 } else {
183- config.animations.slowdown183+ config.animations.slowdown.clamp(0., 100.)
184 };184 };
185 animation::ANIMATION_SLOWDOWN.store(slowdown, Ordering::Relaxed);185 animation::ANIMATION_SLOWDOWN.store(slowdown, Ordering::Relaxed);
186 186
src/niri.rsmodified+1 -1
@@ -585,7 +585,7 @@ impl State {
585 let slowdown = if config.animations.off {585 let slowdown = if config.animations.off {
586 0.586 0.
587 } else {587 } else {
588- config.animations.slowdown588+ config.animations.slowdown.clamp(0., 100.)
589 };589 };
590 animation::ANIMATION_SLOWDOWN.store(slowdown, Ordering::Relaxed);590 animation::ANIMATION_SLOWDOWN.store(slowdown, Ordering::Relaxed);
591 591