We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2de4b13 commit e7586feCopy full SHA for e7586fe
backlightd/src/monitors.rs
@@ -232,6 +232,11 @@ pub(crate) fn turn_on() -> anyhow::Result<()> {
232
233
pub(crate) fn get_average_brightness() -> u8 {
234
let monitors = MONITORS.lock().unwrap();
235
+
236
+ if monitors.is_empty() {
237
+ return 0;
238
+ }
239
240
let mut sum: usize = 0;
241
242
for monitor in &*monitors {
0 commit comments