forked from unom/punktfunk
fix(apple): detect macOS HDR via potential EDR headroom, not current
`maximumExtendedDynamicRangeColorComponentValue` is the CURRENTLY-allocated EDR headroom, which macOS hands out on demand — an idle SDR desktop reads 1.0 even with an HDR display enabled and active, so gating HDR advertisement on it means an HDR monitor (e.g. Samsung G95SC) never gets advertised at connect time. Use `maximumPotentialExtendedDynamicRangeColorComponentValue`, the mode-independent capability (the macOS analogue of the tvOS/iOS gates). Also point the Xcode scheme's LaunchAction at Release. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
shouldAutocreateTestPlan = "YES">
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
buildConfiguration = "Release"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
|
||||
@@ -210,7 +210,13 @@ final class SessionModel: ObservableObject {
|
||||
// metadata we apply (Step 2) when it IS HDR.
|
||||
let displayHDR: Bool = {
|
||||
#if os(macOS)
|
||||
return (NSScreen.main?.maximumExtendedDynamicRangeColorComponentValue ?? 1.0) > 1.0
|
||||
// POTENTIAL, not current, headroom: `maximumExtendedDynamicRangeColorComponentValue`
|
||||
// is the CURRENTLY-ALLOCATED headroom, which macOS hands out on demand — on an idle
|
||||
// SDR desktop it reads 1.0 even with HDR enabled and active (external HDR displays
|
||||
// like the Samsung G95SC allocate EDR only when content asks). Gating on it means an
|
||||
// HDR monitor never gets advertised at connect time. `maximumPotential…` is the
|
||||
// mode-independent capability (the macOS analogue of the tvOS/iOS gates below).
|
||||
return (NSScreen.main?.maximumPotentialExtendedDynamicRangeColorComponentValue ?? 1.0) > 1.0
|
||||
#elseif os(tvOS)
|
||||
// NOT the EDR headroom here: on tvOS that reflects the CURRENT output mode, and
|
||||
// Apple's recommended setup runs an SDR home screen with Match Content — an
|
||||
|
||||
Reference in New Issue
Block a user