Implement cloned displays #14
Open
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.
Note: not well tested, created by claude by heavily referring to https://github.com/MartinGC94/DisplayConfig
Clone/Duplicate Display Support
Overview
Adds comprehensive support for clone (duplicate) displays, allowing multiple monitors to show identical content. Supports pure clone mode or mixed configurations with both cloned and extended displays.
Implementation
Uses Windows CCD API with a two-phase application pattern based on the DisplayConfig PowerShell module:
Phase 1: Enable displays and set clone groups using
SDC_TOPOLOGY_SUPPLIEDPhase 2: Apply resolution, refresh rate, and position using
SDC_USE_SUPPLIED_DISPLAY_CONFIGClone groups are encoded in the
modeInfoIdxfield:CloneGroupId(displays with same ID mirror content)SourceModeInfoIdx(index into mode array)Key Changes
CloneGroupIdpropertyEnableDisplays()andApplyDisplayTopology()Backward Compatibility
✅ Profiles without
CloneGroupIdload normally (empty = extended mode)✅ Existing extended display configurations work unchanged
Testing