Skip to content

Commit

Permalink
fix stupid bug
Browse files Browse the repository at this point in the history
  • Loading branch information
adryzz committed Oct 28, 2022
1 parent a9b7e73 commit 2e2291f
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions SeeShark/Device/DisplayManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ private DisplayInfo[] enumerateDevicesX11()
for (int i = 0; i < info.Length - 1; i++)
{
XRRMonitorInfo monitor = monitors[i];
string nameAddition = monitor.Name == null ? "" : $" ({new string(monitor.Name)})";
string nameAddition = "";//monitor.Name == null ? "" : $" ({new string(monitor.Name)})";
info[i + 1] = new DisplayInfo
{
Name = $"Display {i}{nameAddition}",
Expand Down Expand Up @@ -155,22 +155,23 @@ bool MonitorDelegate(IntPtr hMonitor, IntPtr hdcMonitor, ref Rect lprcMonitor, I
compositeBottom = (info.dmPositionY + info.dmPelsHeight);

}

displayInfo.Insert(0, new DisplayInfo
{
Name = $"Composite GDI Display",
Path = "desktop",
X = compositeLeft,
Y = compositeTop,
Width = compositeRight - compositeLeft,
Height = compositeBottom - compositeTop,
Primary = false,
IsComposite = true
});
return true;
}

User32.EnumDisplayMonitors(IntPtr.Zero, IntPtr.Zero, MonitorDelegate, IntPtr.Zero);

displayInfo.Insert(0, new DisplayInfo
{
Name = $"Composite GDI Display",
Path = "desktop",
X = compositeLeft,
Y = compositeTop,
Width = compositeRight - compositeLeft,
Height = compositeBottom - compositeTop,
Primary = false,
IsComposite = true
});

return displayInfo.ToArray();
//return CollectionsMarshal.AsSpan(displayInfo);
}
Expand Down

0 comments on commit 2e2291f

Please sign in to comment.