Set minimum screen brightness level to 1, not 0
This commit is contained in:
parent
2239788f86
commit
8e66dc234e
@ -547,7 +547,7 @@ fn find_backlight_control(conn: &xcb::Connection, output: randr::Output) -> anyh
|
|||||||
if let Ok(reply) = conn.wait_for_reply(cookie) {
|
if let Ok(reply) = conn.wait_for_reply(cookie) {
|
||||||
let values = reply.valid_values();
|
let values = reply.valid_values();
|
||||||
if reply.range() && values.len() == 2 {
|
if reply.range() && values.len() == 2 {
|
||||||
let min_level = values[0];
|
let min_level = values[0] + 1;
|
||||||
let max_level = values[1];
|
let max_level = values[1];
|
||||||
let range = max_level - min_level;
|
let range = max_level - min_level;
|
||||||
if range > 0 {
|
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);
|
debug!("Found sysfs backlight control at {:?}", cur_path);
|
||||||
return Ok(Some(BacklightControl {
|
return Ok(Some(BacklightControl {
|
||||||
location: BacklightLocation::Sysfs(cur_path),
|
location: BacklightLocation::Sysfs(cur_path),
|
||||||
min_level: 0,
|
min_level: 1,
|
||||||
max_level,
|
max_level,
|
||||||
step: calc_step(0, max_level),
|
step: calc_step(0, max_level),
|
||||||
}));
|
}));
|
||||||
|
Loading…
Reference in New Issue
Block a user