mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 14:07:46 +08:00
add resize fallback
Add resize fallback if the target OS fails to resize using the most current method. (for example, this occurs with Server2008R2)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Runtime.Versioning;
|
||||
using System;
|
||||
using System.Runtime.Versioning;
|
||||
using System.Windows.Forms;
|
||||
using AxMSTSCLib;
|
||||
using MSTSCLib;
|
||||
@@ -34,7 +35,15 @@ namespace mRemoteNG.Connection.Protocol.RDP
|
||||
|
||||
protected override void UpdateSessionDisplaySettings(uint width, uint height)
|
||||
{
|
||||
RdpClient9.UpdateSessionDisplaySettings(width, height, width, height, Orientation, DesktopScaleFactor, DeviceScaleFactor);
|
||||
try
|
||||
{
|
||||
RdpClient9.UpdateSessionDisplaySettings(width, height, width, height, Orientation, DesktopScaleFactor, DeviceScaleFactor);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// target OS does not support newer method, fallback to an older method
|
||||
base.UpdateSessionDisplaySettings(width, height);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user