Skip to content

Commit

Permalink
1.8.2-3
Browse files Browse the repository at this point in the history
doubled displays
  • Loading branch information
Codectory committed Dec 22, 2021
1 parent 9952427 commit 2887b09
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions Source/AutoHDR.Displays/DisplayManagerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,12 @@ private void SystemEvents_DisplaySettingsChanged(object sender, EventArgs e)
UpdateDisplays();
}

public void LoadKnownDisplays(IList<Display> knownMonitors)
public void LoadKnownDisplays(List<Display> knownMonitors)
{
foreach (var monitor in knownMonitors)
Displays.Add(monitor);
//foreach (var monitor in knownMonitors)
// Displays.Add(monitor);
MergeMonitors(knownMonitors);

MergeMonitors(GetActiveMonitors());
}

Expand Down
2 changes: 1 addition & 1 deletion Source/AutoHDR.Displays/IDisplayManagerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public interface IDisplayManagerBase
int GetRefreshRate(Display display);
Size GetResolution(Display display);
uint GetUID(uint displayUD);
void LoadKnownDisplays(IList<Display> knownMonitors);
void LoadKnownDisplays(List<Display> knownMonitors);
void SetColorDepth(Display display, ColorDepth colorDepth);
void SetRefreshRate(Display display, int refreshRate);
void SetResolution(Display display, Size resolution);
Expand Down
2 changes: 1 addition & 1 deletion Source/AutoHDR/AutoHDRDaemon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ private void InitializeTrayMenuHelper()
private void InitializeDisplayManager()
{
Globals.Logs.Add("Initializing DisplayManager...", false);
DisplayManagerHandler.Instance.LoadKnownDisplays(Settings.Displays);
DisplayManagerHandler.Instance.LoadKnownDisplays(Settings.Displays.ToList());
DisplayManagerHandler.Instance.HDRIsActiveChanged += MonitorManager_HDRIsActiveChanged;
DisplayManagerHandler.Instance.ExceptionThrown += (o, ex) => Globals.Logs.AddException(ex);
DisplayManagerHandler.Instance.SelectedHDR = !Settings.GlobalAutoHDR;
Expand Down

0 comments on commit 2887b09

Please sign in to comment.