Repository navigation
feat(displays): native display backend behind a config flag (#91) - #98
Merged
Merged
Conversation
Second step of replacing the bundled NirSoft tools: every MultiMonitorTool command now goes through a display backend. The native one uses Windows' own APIs: CCD (QueryDisplayConfig/SetDisplayConfig) to list, attach and detach monitors and set the primary, ChangeDisplaySettingsEx for modes and positions, DDC/CI (dxva2) for the turnOff strategy, and SetWindowPos to move windows. - Off by default: "NativeDisplays": true in config.json turns it on. - Same identity as MultiMonitorTool: the monitor ID saved in config.json is rebuilt from the device instance and its driver key, and name/serial come from the EDID, so saved screens keep matching. - Same layout backup format; restoring follows monitors by MonitorID when a re-enabled monitor comes back as another \\.\DISPLAYn, and re-enabling prefers the video source a monitor had before. - MonitorService keeps its retries, waits and fallbacks; only the single commands moved into MmtDisplayBackend / NativeDisplayBackend. - Pure parts (EDID, device path, monitor ID, source assignment, layout file) in DisplayIdentity with tests; manual checklist in docs/TESTING.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>
lippdev
force-pushed
the
feat/native-displays
branch
from
September 28, 2026 13:31
0b1bd5e to
a987f5e
Compare
lippdev
marked this pull request as ready for review
September 28, 2026 13:31
Contributor
There was a problem hiding this comment.
Important
The test project cannot be loaded until its unresolved merge conflict is fixed.
Reviewed changes This review covers the opt-in native Windows display backend and its integration with monitor identity, layout backups, and session orchestration.
- Native display operations. Adds CCD-based monitor enumeration and enable/disable, native mode changes, DDC/CI power control, and process-window movement behind
NativeDisplays. - Identity and layout compatibility. Adds EDID/monitor identity mapping, source assignment, and MultiMonitorTool-compatible layout save/restore.
- Validation. Adds pure identity/layout tests and manual hardware checks; hardware behavior remains unverified.
GPT Luna | 𝕏
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes This run reviewed the test-project merge-conflict resolution since the prior Pullfrog review.
- Resolved test source links. Removed the conflict markers while retaining the
AudioNaming.csandDisplayIdentity.cscompile entries.
GPT Luna | 𝕏
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.

Summary
Second step of #91: replaces MultiMonitorTool with Windows' own display APIs, behind
"NativeDisplays": trueinconfig.json(off by default; the log showsdisplays=native)./scommalistingQueryDisplayConfig(all paths) + target names; monitor ID and EDID from the registry/enable,/disableSetDisplayConfigattaching/detaching paths (refuses to detach every screen)/SetPrimaryCcdHelper.SetPrimary/SetMonitors(mode, position)ChangeDisplaySettingsEx/SaveConfig,/LoadConfig.cfgformat, written and applied natively/TurnOn,/TurnOff0xD6via dxva2/MoveWindowSetWindowPoson the process windowsStructure
MonitorServicekeeps all its orchestration (retries, waits, CCD fallbacks). Only the single commands moved behindIDisplayBackend, withMmtDisplayBackend(the old calls, unchanged) andNativeDisplayBackend.config.jsonis rebuilt in MultiMonitorTool's format (MONITOR\{hwid}\{driver key}), and name/serial come from the EDID, so the saved game screen and hidden screens keep matching.\\.\DISPLAYn. Re-enabling prefers the source it had before, and restore follows monitors byMonitorIDin the backup.DisplayIdentity(EDID, device path, monitor ID, source assignment, layout file) with unit tests.Not verified yet
Written on macOS; CI builds it on Windows, but none of it has run on real hardware. The manual checklist is in
docs/TESTING.md("Telas nativas"). Draft until it passes.Riskiest parts, in order: attaching an inactive monitor through
SetDisplayConfig(TV that starts off), whether the rebuilt monitor ID matches what MultiMonitorTool saved, and restoring positions/primary.Conflicts with #97 (native audio) in
Models.cs,MainViewModel.BuildConfig,ConsoleEngineand the startup log line: both add a flag next to each other. Trivial; whichever merges second gets rebased.🤖 Generated with Claude Code