Enforce valid image brightness in daemon and asusctl

This commit is contained in:
I Al Istannen
2022-07-16 03:00:22 +00:00
committed by Luke Jones
parent ef04549c8e
commit c0e36295b7
6 changed files with 50 additions and 12 deletions

View File

@@ -44,8 +44,8 @@ impl CtrlAnimeZbus {
let mut bright = bright;
if bright < 0.0 {
bright = 0.0
} else if bright > 254.0 {
bright = 254.0;
} else if bright > 1.0 {
bright = 1.0;
}
lock.config.brightness = bright;
lock.config.write();