You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tweaks for software dimming after brightness reached zero function
- Added OSD animation to indicate that something is going on + circumvent the gamma change no screen refresh issue on some mac
- Smooth brightness change is now only happening on config changes + added blank birghtness OSD to give a hint on what is happening + also circumvent the no refresh issue.
if externalDisplay.getSwBrightness()!= savedPrefValue {
92
+
iflet manager =OSDManager.sharedManager()as?OSDManager{ // This will give the user a hint why is the brightness suddenly changes and also give screen activity to counter the 'no gamma change when there is no screen activity' issue on some macs
letlowTreshold:Float=0.05 // We don't allow decrease lower than 5% for safety reasons and because some displays blank off after a while on full black screen due to energy saving settings
98
+
letlowTreshold:Float=0.1 // We don't allow decrease lower than 5% for safety reasons and because some displays blank off after a while on full black screen due to energy saving settings
99
99
if !reverse {
100
100
return value *(1- lowTreshold)+ lowTreshold
101
101
}else{
@@ -115,7 +115,7 @@ class Display {
115
115
if smooth {
116
116
DispatchQueue.global(qos:.userInteractive).async{
117
117
self.swBrightnessSemaphore.wait()
118
-
fortransientValueinstride(from: currentValue, to: newValue, by:0.0025*(currentValue > newValue ?-1:1)){
118
+
fortransientValueinstride(from: currentValue, to: newValue, by:0.005*(currentValue > newValue ?-1:1)){
slider.minValue =Double(display.getSwMaxBrightness())*0.2 // Don't let brightness to down for software brightness control as the user won't see the slider anymore
88
-
}
86
+
// if display.isSw() {
87
+
// slider.minValue = Double(display.getSwMaxBrightness()) * 0.2 // Don't let brightness to down for software brightness control as the user won't see the slider anymore
88
+
// }
89
89
}else{
90
90
// If we're looking at the audio speaker volume, also retrieve the values for the mute command
0 commit comments