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>> {
180180 let slowdown = if config.animations.off {
181181 0.
182182 } else {
183- config.animations.slowdown
183+ config.animations.slowdown.clamp(0., 100.)
184184 };
185185 animation::ANIMATION_SLOWDOWN.store(slowdown, Ordering::Relaxed);
186186
src/niri.rsmodified+1 -1
@@ -585,7 +585,7 @@ impl State {
585585 let slowdown = if config.animations.off {
586586 0.
587587 } else {
588- config.animations.slowdown
588+ config.animations.slowdown.clamp(0., 100.)
589589 };
590590 animation::ANIMATION_SLOWDOWN.store(slowdown, Ordering::Relaxed);
591591