mirror of
https://github.com/MonitorControl/MonitorControl.git
synced 2026-05-15 14:15:55 -06:00
Update DDC.swift.
This commit is contained in:
parent
c5997ed8b1
commit
4f162b196c
5 changed files with 13 additions and 12 deletions
|
|
@ -1,4 +1,4 @@
|
|||
github "reitermarkus/DDC.swift" "fc12c4635f8052e980cc11c5bcb5c7c94b3dd2ff"
|
||||
github "reitermarkus/DDC.swift" "7f69d79447f37fdd2d9b4cd2489cb1566aa8a4ee"
|
||||
github "rnine/AMCoreAudio" "3.2.1"
|
||||
github "shpakovski/MASPreferences" "1.3"
|
||||
github "the0neyouseek/MediaKeyTap" "abfe09f53ccabb1aa14a0f4ab99cfb8812f41919"
|
||||
|
|
|
|||
|
|
@ -5,7 +5,10 @@ extension Display {
|
|||
}
|
||||
|
||||
static let whitelist: [UInt32: [UInt32: [WhitelistReason]]] = [
|
||||
7789: [30460: [.hideOsd, .longerDelay]], // LG 38UC99-W
|
||||
7789: [
|
||||
30460: [.hideOsd, .longerDelay], // LG 38UC99-W over DisplayPort
|
||||
30459: [.hideOsd, .longerDelay], // LG 38UC99-W over HDMI
|
||||
],
|
||||
]
|
||||
|
||||
var hideOsd: Bool {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.5.1</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>337</string>
|
||||
<string>494</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
|
|
|||
|
|
@ -42,23 +42,21 @@ class Utils: NSObject {
|
|||
|
||||
var values: (UInt16, UInt16)?
|
||||
|
||||
if display.ddc?.supported() == true {
|
||||
let delay = display.needsLongerDelay ? UInt64(40 * kMillisecondScale) : nil
|
||||
|
||||
if display.ddc?.supported(minReplyDelay: delay) == true {
|
||||
os_log("Display supports DDC.", type: .debug)
|
||||
} else {
|
||||
os_log("Display does not support DDC.", type: .debug)
|
||||
}
|
||||
|
||||
if display.ddc?.enableAppReport() == true {
|
||||
os_log("Display supports DDC (enableAppReport).", type: .debug)
|
||||
os_log("Display supports enabling DDC application report.", type: .debug)
|
||||
} else {
|
||||
os_log("Display does not support DDC (enableAppReport).", type: .debug)
|
||||
os_log("Display does not support enabling DDC application report.", type: .debug)
|
||||
}
|
||||
|
||||
if display.needsLongerDelay {
|
||||
values = display.ddc?.read(command: command, tries: 10, minReplyDelay: UInt64(20 * kMillisecondScale))
|
||||
} else {
|
||||
values = display.ddc?.read(command: command, tries: 10)
|
||||
}
|
||||
values = display.ddc?.read(command: command, tries: 10, minReplyDelay: delay)
|
||||
|
||||
let (currentValue, maxValue) = values ?? (UInt16(display.getValue(for: command)), UInt16(display.getMaxValue(for: command)))
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.5.1</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>337</string>
|
||||
<string>494</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</string>
|
||||
<key>LSBackgroundOnly</key>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue