Do not use DDC if it is disabled for the display and Software Fallback is off.

This commit is contained in:
waydabber 2021-08-14 18:24:45 +02:00
parent 1b8d342acf
commit 36eeb43c40
3 changed files with 6 additions and 8 deletions

View file

@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>2328</string>
<string>2332</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>

View file

@ -125,10 +125,8 @@ class ExternalDisplay: Display {
let isAlreadySet = volumeOSDValue == self.getValue(for: .audioSpeakerVolume)
if !isAlreadySet {
guard self.writeDDCValues(command: .audioSpeakerVolume, value: volumeDDCValue) == true else {
return
}
guard self.writeDDCValues(command: .audioSpeakerVolume, value: volumeDDCValue) == true else {
return
}
if let muteValue = muteValue {
@ -218,7 +216,7 @@ class ExternalDisplay: Display {
}
public func writeDDCValues(command: DDC.Command, value: UInt16, errorRecoveryWaitTime _: UInt32? = nil) -> Bool? {
guard app.sleepID == 0, app.reconfigureID == 0 else {
guard app.sleepID == 0, app.reconfigureID == 0, !self.forceSw else {
return false
}
if Arm64DDCUtils.isArm64 {
@ -239,7 +237,7 @@ class ExternalDisplay: Display {
func readDDCValues(for command: DDC.Command, tries: UInt, minReplyDelay delay: UInt64?) -> (current: UInt16, max: UInt16)? {
var values: (UInt16, UInt16)?
guard app.sleepID == 0, app.reconfigureID == 0 else {
guard app.sleepID == 0, app.reconfigureID == 0, !self.forceSw else {
return values
}
if Arm64DDCUtils.isArm64 {

View file

@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>2328</string>
<string>2332</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSBackgroundOnly</key>