Repository navigation
Apply SDR calibration through the Advanced Color list, keep per-mode profiles - #12
Merged
Merged
Conversation
…profiles SDR installs only associated the profile through the legacy WCS list (ICMProfile). Windows applies MHC2 only from the Advanced Color list (ICMProfileAC), so SDR corrections never reached the display and verification measured the native panel (issue #11). Install now activates the profile through AdvancedColorProfileAssociation.TryActivateInstalled in both modes, keeps the legacy association for ICC-aware apps in SDR, and sets InstallResult.Warning when Auto Color Management is off, which the report window shows once before verifying. Install uses TryInstallVerified in both modes, undoes the legacy association and a newly installed file on refusal or exception, and gives a colliding generated name a numeric suffix. Reenable mirrors this and undoes only an association it created. TryRemoveCurrentUser treats ERROR_PROFILE_NOT_ASSOCIATED_WITH_DEVICE as nothing to remove. Windows keeps one Advanced Color default per display for SDR and HDR. MonitorProfileData now records Mhc2SdrProfileName and Mhc2HdrProfileName next to the active Mhc2ProfileName, plus PreviousAdvancedColorProfileName for the non-Gloam default a Gloam activation displaced. AdvancedColorProfileMigrationService.ReconcileModeChanges runs at startup and on display events before ApplyAll. On first sight of a monitor and on each SDR/HDR transition it retires the other mode's profile, activates the slot for the current mode, or restores the displaced profile when the mode has none. A refused step is retried on the next display event. Records from before the slots are classified from the standard-target segment of the profile name, falling back to PreviousColorProfileHdrMode. SetMonitorProfile keeps the stored calibration fields so a stale editor save cannot roll back a swap. TrustCheck measures in the current mode against the active profile's target and refuses on a mode mismatch. Profile Manager files an activated profile under the mode it was built for and restores the displaced profile on deactivate. Version 1.10.0 with release notes. Tests cover DecideModeSwitch, name classification, slot bookkeeping and reload, mode swaps, retry after a refused retire or restore, and the stale-save guard.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SDR calibrations never reached the display: Gloam registered them only in the legacy profile list, and Windows reads MHC2 only from the Advanced Color list. Thanks to @MrBrown55 for the report and diagnostics that made this easy to pin down.
Windows keeps one Advanced Color profile per display for both SDR and HDR, so this also keeps a separate SDR and HDR calibration per display and swaps the right one in when HDR is turned on or off.
Changelog (1.10.0)
Verified on hardware that Windows accepts and keeps the Advanced Color default on an SDR display with ACM off. Not yet verified end to end with a colorimeter in SDR.
Closes #11