aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteDesktop
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-05-20 06:24:09 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-05-20 06:24:09 +0300
commited0c073eae5358b509c68e3051c489bd25be30c9 (patch)
tree2dd9f25649fbb6357791b39f5c3cedb415f8f2c9 /Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteDesktop
parentb40bfa0f652ec194f2c4d05ae02f0a9c420b50fc (diff)
downloadTango-ed0c073eae5358b509c68e3051c489bd25be30c9.tar.gz
Tango-ed0c073eae5358b509c68e3051c489bd25be30c9.zip
Several fixes and improvements after first real test against PPC.
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteDesktop')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteDesktop/DefaultRemoteDesktopService.cs38
1 files changed, 25 insertions, 13 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteDesktop/DefaultRemoteDesktopService.cs b/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteDesktop/DefaultRemoteDesktopService.cs
index 7ba020174..b118dcdda 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteDesktop/DefaultRemoteDesktopService.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.Common/RemoteDesktop/DefaultRemoteDesktopService.cs
@@ -100,12 +100,22 @@ namespace Tango.PPC.Common.RemoteDesktop
private void ApplicationManager_ApplicationReady(object sender, EventArgs e)
{
-#if DEBUG
- _engine.CaptureMethod.Dispose();
var mainWindow = System.Windows.Application.Current.MainWindow;
- mainWindow.LocationChanged += (_, __) =>
+
+ if (mainWindow.WindowStyle != System.Windows.WindowStyle.None)
{
+ mainWindow.LocationChanged += (_, __) =>
+ {
+ _engine.CaptureRegion = new CaptureRegion()
+ {
+ Left = (int)mainWindow.Left + 10,
+ Top = (int)mainWindow.Top + 5,
+ Width = (int)mainWindow.Width - 20,
+ Height = (int)mainWindow.Height - 15
+ };
+ };
+
_engine.CaptureRegion = new CaptureRegion()
{
Left = (int)mainWindow.Left + 10,
@@ -113,17 +123,19 @@ namespace Tango.PPC.Common.RemoteDesktop
Width = (int)mainWindow.Width - 20,
Height = (int)mainWindow.Height - 15
};
- };
-
- _engine.CaptureRegion = new CaptureRegion()
+ }
+ else
{
- Left = (int)mainWindow.Left + 10,
- Top = (int)mainWindow.Top + 5,
- Width = (int)mainWindow.Width - 20,
- Height = (int)mainWindow.Height - 15
- };
- _engine.CaptureMethod = new GdiScreenCapture();
-#endif
+ //DirectX capturing is not working on PPC !! Maybe when we replace ?
+ //try
+ //{
+ // _engine.CaptureMethod = new DirectXScreenCapture();
+ //}
+ //catch (Exception ex)
+ //{
+ // LogManager.Log(ex, "Could not initialize DirectX screen capture method on this device. Falling back to GDI.");
+ //}
+ }
_engine.Comparer.MaxDifferencesThrow = _engine.CaptureRegion.Width * _engine.CaptureRegion.Height / 2;
}