mirror of
https://github.com/MonitorControl/MonitorControl.git
synced 2026-05-21 06:46:18 -06:00
Do not use DDC if it is disabled for the display and Software Fallback is off.
This commit is contained in:
parent
1b8d342acf
commit
36eeb43c40
3 changed files with 6 additions and 8 deletions
|
|
@ -19,7 +19,7 @@
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>$(MARKETING_VERSION)</string>
|
<string>$(MARKETING_VERSION)</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>2328</string>
|
<string>2332</string>
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
<string>public.app-category.utilities</string>
|
<string>public.app-category.utilities</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
|
|
||||||
|
|
@ -125,10 +125,8 @@ class ExternalDisplay: Display {
|
||||||
|
|
||||||
let isAlreadySet = volumeOSDValue == self.getValue(for: .audioSpeakerVolume)
|
let isAlreadySet = volumeOSDValue == self.getValue(for: .audioSpeakerVolume)
|
||||||
|
|
||||||
if !isAlreadySet {
|
guard self.writeDDCValues(command: .audioSpeakerVolume, value: volumeDDCValue) == true else {
|
||||||
guard self.writeDDCValues(command: .audioSpeakerVolume, value: volumeDDCValue) == true else {
|
return
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if let muteValue = muteValue {
|
if let muteValue = muteValue {
|
||||||
|
|
@ -218,7 +216,7 @@ class ExternalDisplay: Display {
|
||||||
}
|
}
|
||||||
|
|
||||||
public func writeDDCValues(command: DDC.Command, value: UInt16, errorRecoveryWaitTime _: UInt32? = nil) -> Bool? {
|
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
|
return false
|
||||||
}
|
}
|
||||||
if Arm64DDCUtils.isArm64 {
|
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)? {
|
func readDDCValues(for command: DDC.Command, tries: UInt, minReplyDelay delay: UInt64?) -> (current: UInt16, max: UInt16)? {
|
||||||
var values: (UInt16, 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
|
return values
|
||||||
}
|
}
|
||||||
if Arm64DDCUtils.isArm64 {
|
if Arm64DDCUtils.isArm64 {
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>$(MARKETING_VERSION)</string>
|
<string>$(MARKETING_VERSION)</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>2328</string>
|
<string>2332</string>
|
||||||
<key>LSApplicationCategoryType</key>
|
<key>LSApplicationCategoryType</key>
|
||||||
<string>public.app-category.utilities</string>
|
<string>public.app-category.utilities</string>
|
||||||
<key>LSBackgroundOnly</key>
|
<key>LSBackgroundOnly</key>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue