Move capturer init.

This commit is contained in:
Jared Goodwin 2020-04-22 18:22:43 -07:00
parent c22ab815dc
commit 54a4f645bf
3 changed files with 1 additions and 2 deletions

View File

@ -39,6 +39,7 @@ namespace Remotely.ScreenCast.Core.Services
var fpsQueue = new Queue<DateTimeOffset>();
mode = Conductor.Mode;
var viewer = ServiceContainer.Instance.GetRequiredService<Viewer>();
viewer.Capturer.Init();
viewer.Name = screenCastRequest.RequesterName;
viewer.ViewerConnectionID = screenCastRequest.ViewerID;
viewers = Conductor.Viewers;

View File

@ -16,7 +16,6 @@ namespace Remotely.ScreenCast.Linux.Services
public ScreenCapturerLinux()
{
Display = LibX11.XOpenDisplay(null);
Init();
}
public event EventHandler<Rectangle> ScreenChanged;

View File

@ -44,7 +44,6 @@ namespace Remotely.ScreenCast.Win.Services
private readonly Dictionary<string, DirectXOutput> directxScreens = new Dictionary<string, DirectXOutput>();
public ScreenCapturerWin()
{
Init();
SystemEvents.DisplaySettingsChanged += SystemEvents_DisplaySettingsChanged;
}