diff --git a/Cartfile.resolved b/Cartfile.resolved index 80ac05f..9a47886 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -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" diff --git a/MonitorControl/Extensions/Display+Whitelist.swift b/MonitorControl/Extensions/Display+Whitelist.swift index 40cb717..43f5c29 100644 --- a/MonitorControl/Extensions/Display+Whitelist.swift +++ b/MonitorControl/Extensions/Display+Whitelist.swift @@ -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 { diff --git a/MonitorControl/Info.plist b/MonitorControl/Info.plist index edf17b2..bd0abcc 100644 --- a/MonitorControl/Info.plist +++ b/MonitorControl/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.5.1 CFBundleVersion - 337 + 494 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/MonitorControl/Support/Utils.swift b/MonitorControl/Support/Utils.swift index 97e5192..5ca7cd1 100644 --- a/MonitorControl/Support/Utils.swift +++ b/MonitorControl/Support/Utils.swift @@ -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))) diff --git a/MonitorControlHelper/Info.plist b/MonitorControlHelper/Info.plist index 326f219..3765ba1 100644 --- a/MonitorControlHelper/Info.plist +++ b/MonitorControlHelper/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString 1.5.1 CFBundleVersion - 337 + 494 LSApplicationCategoryType public.app-category.utilities LSBackgroundOnly