don't apply offset when screen is off
This commit is contained in:
parent
bee1f35542
commit
550fa7f18b
1 changed files with 7 additions and 2 deletions
|
|
@ -165,9 +165,14 @@ int main (void)
|
|||
actual_brightness = brightness_adjusted;
|
||||
}
|
||||
|
||||
// if the actual brightness is zero, it means that the screen is turned
|
||||
// off for some reason, usually DPMS. As such it should not count for user
|
||||
// offset. Look at the TODO file.
|
||||
if (actual_brightness != 0) {
|
||||
off = actual_brightness - brightness_target;
|
||||
if (brightness_target != max_brightness || off < 0){
|
||||
user_offset = off;
|
||||
if (brightness_target != max_brightness || off < 0){
|
||||
user_offset = off;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: option to turn off logging
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue