From 6e70f36134326ba3a824c019d7d54fcd2ca1d671 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sat, 18 Jul 2026 04:01:19 +1000 Subject: [PATCH] [idd] never add the extraMode to the EDID Doing so causes windows to treat a new EDID as a new monitor --- idd/LGIdd/CEdid.cpp | 8 ++++++++ idd/LGIdd/CSettings.cpp | 8 +++++++- idd/LGIdd/CSettings.h | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/idd/LGIdd/CEdid.cpp b/idd/LGIdd/CEdid.cpp index f9fbfc8a..c23fa60b 100644 --- a/idd/LGIdd/CEdid.cpp +++ b/idd/LGIdd/CEdid.cpp @@ -554,6 +554,10 @@ void CEdid::Build(const CSettings::DisplayModes& modes) baseDtdIndex < EDID_BASE_DETAILED_TIMING_COUNT; ++modeIndex) { + // never include the extra mode in the EDID + if (sorted[modeIndex].extraMode) + continue; + if (MakeDetailedTiming( baseBlock.descriptors[baseDtdIndex].detailedTiming, sorted[modeIndex])) @@ -589,6 +593,10 @@ void CEdid::Build(const CSettings::DisplayModes& modes) ctaDtdWrite + EDID_DTD_SIZE <= EDID_BLOCK_SIZE - 1; ++modeIndex) { + // never include the extra mode in the EDID + if (sorted[modeIndex].extraMode) + continue; + if (WriteDetailedTiming(cta + ctaDtdWrite, sorted[modeIndex])) ctaDtdWrite += EDID_DTD_SIZE; } diff --git a/idd/LGIdd/CSettings.cpp b/idd/LGIdd/CSettings.cpp index f1256cc6..4e38d227 100644 --- a/idd/LGIdd/CSettings.cpp +++ b/idd/LGIdd/CSettings.cpp @@ -58,6 +58,7 @@ void CSettings::LoadModes() m.height = DefaultDisplayModes[i][1]; m.refresh = defaultRefresh; m.preferred = !hasPreferred && (i == DefaultPreferredDisplayMode); + m.extraMode = false; m_displayModes.push_back(m); } return; @@ -209,7 +210,11 @@ bool CSettings::GetExtraMode(DisplayMode& mode) if (extraMode.empty()) return false; - return ParseModeString(extraMode, mode); + if (!ParseModeString(extraMode, mode)) + return false; + + mode.extraMode = true; + return true; } unsigned CSettings::GetDefaultRefresh() const @@ -318,5 +323,6 @@ bool CSettings::ParseModeString(const std::wstring& in, DisplayMode& out) out.refresh > 1000) return false; + out.extraMode = false; return true; } diff --git a/idd/LGIdd/CSettings.h b/idd/LGIdd/CSettings.h index 2137a916..a391da52 100644 --- a/idd/LGIdd/CSettings.h +++ b/idd/LGIdd/CSettings.h @@ -32,6 +32,7 @@ class CSettings unsigned height; unsigned refresh; bool preferred; + bool extraMode; }; typedef std::vector DisplayModes;