[idd] config: reload persisted display modes

Rebuild the driver's cached mode list before replugging the monitor so
Windows enumerates the settings saved by the helper.

Keep saved mode refresh rates intact and update only ExtraMode to the
configured default refresh.
This commit is contained in:
Geoffrey McRae
2026-08-06 23:05:45 +10:00
parent 05599ffd02
commit a279a87bdb
5 changed files with 65 additions and 13 deletions

View File

@@ -215,6 +215,11 @@ private:
// Never held across an IddCx API call - snapshot then call.
mutable SRWLOCK m_modeLock = SRWLOCK_INIT;
// Serializes registry-backed mode changes with rebuilding m_displayModes.
// Reload requests arrive on the pipe thread while dynamic resolution
// requests arrive on the LGMP timer thread.
SRWLOCK m_modeReloadLock = SRWLOCK_INIT;
CSettings::DisplayModes m_displayModes;
CEdid m_edid;
@@ -238,6 +243,7 @@ public:
void InitAdapter();
void FinishAdapterInit(UINT connectorIndex);
void FinishInit(UINT connectorIndex);
void ReloadSettings();
void ReplugMonitor();
void OnMonitorDestroyed(IDDCX_MONITOR monitor);