mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Add DX screen count check in Windows ScreenCaster.
This commit is contained in:
parent
6589a730d8
commit
40897e8dd2
@ -13,6 +13,7 @@ using Remotely.ScreenCast.Win.Capture;
|
||||
using Remotely.ScreenCast.Core.Communication;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Remotely.ScreenCast.Win
|
||||
{
|
||||
@ -81,7 +82,17 @@ namespace Remotely.ScreenCast.Win
|
||||
{
|
||||
try
|
||||
{
|
||||
return new DXCapture();
|
||||
var dxCapture = new DXCapture();
|
||||
if (dxCapture.GetScreenCount() == Screen.AllScreens.Length)
|
||||
{
|
||||
return dxCapture;
|
||||
}
|
||||
else
|
||||
{
|
||||
Logger.Write("DX screen count doesn't match. Using CPU capturer instead.");
|
||||
dxCapture.Dispose();
|
||||
return new BitBltCapture();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user