Set minimum screen brightness level to 1, not 0

This commit is contained in:
Brian Tarricone 2024-08-04 21:32:40 -07:00
parent 4ed974335e
commit b6282d82c6

View File

@ -547,7 +547,7 @@ fn find_backlight_control(conn: &xcb::Connection, output: randr::Output) -> anyh
if let Ok(reply) = conn.wait_for_reply(cookie) {
let values = reply.valid_values();
if reply.range() && values.len() == 2 {
let min_level = values[0];
let min_level = values[0] + 1;
let max_level = values[1];
let range = max_level - min_level;
if range > 0 {
@ -577,7 +577,7 @@ fn find_backlight_control(conn: &xcb::Connection, output: randr::Output) -> anyh
debug!("Found sysfs backlight control at {:?}", cur_path);
return Ok(Some(BacklightControl {
location: BacklightLocation::Sysfs(cur_path),
min_level: 0,
min_level: 1,
max_level,
step: calc_step(0, max_level),
}));