Skip to content
Commit f84dcdac authored by Albert Vaca Cintora's avatar Albert Vaca Cintora
Browse files

Better libddcutil error handling

The previous `detect` code was never clearing the vector of displays, it would only append new displays leaving the old ones there.

Since we call `detect` when there's an error setting the brightness, it meant the vector would grow each time we try to set the brightness for a display that is in the vector but doesn't exist anymore (or even worse, for a faulty display causing an infinite loop).

This does two things: 
- Clears the vector of displays on each `detect`
- Calls `detect` only once if there are errors when setting the brightness.
parent af14bcf5
Pipeline #275688 passed with stage
in 2 minutes and 43 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment