mirror of https://github.com/quasar/Quasar.git
Small fix for RDP
moved static field to property so command handler gets the initial -1 check starting rdp
This commit is contained in:
parent
ee19378725
commit
f624028755
|
@ -14,7 +14,6 @@ namespace xServer.Core.Commands
|
|||
public static class CommandHandler
|
||||
{
|
||||
private const string DELIMITER = "$E$";
|
||||
private static int lastQuality = -1;
|
||||
|
||||
public static void HandleInitialize(Client client, Initialize packet)
|
||||
{
|
||||
|
@ -117,8 +116,8 @@ public static void HandleRemoteDesktopResponse(Client client, DesktopResponse pa
|
|||
if (client.Value.LastDesktop == null)
|
||||
{
|
||||
client.Value.StreamCodec = new UnsafeStreamCodec();
|
||||
if (lastQuality < 0)
|
||||
lastQuality = packet.Quality;
|
||||
if (client.Value.LastQuality < 0)
|
||||
client.Value.LastQuality = packet.Quality;
|
||||
|
||||
using (MemoryStream ms = new MemoryStream(packet.Image))
|
||||
{
|
||||
|
@ -144,10 +143,10 @@ public static void HandleRemoteDesktopResponse(Client client, DesktopResponse pa
|
|||
{
|
||||
lock (client.Value.StreamCodec)
|
||||
{
|
||||
if (lastQuality != packet.Quality)
|
||||
if (client.Value.LastQuality != packet.Quality)
|
||||
{
|
||||
client.Value.StreamCodec = new UnsafeStreamCodec();
|
||||
lastQuality = packet.Quality;
|
||||
client.Value.LastQuality = packet.Quality;
|
||||
}
|
||||
|
||||
Bitmap newScreen = client.Value.StreamCodec.DecodeData(ms);
|
||||
|
|
|
@ -27,6 +27,8 @@ public class UserState
|
|||
public bool LastDesktopSeen { get; set; }
|
||||
public bool LastDirectorySeen { get; set; }
|
||||
|
||||
public int LastQuality { get; set; }
|
||||
|
||||
public Bitmap LastDesktop { get; set; }
|
||||
|
||||
public UnsafeStreamCodec StreamCodec { get; set; }
|
||||
|
@ -36,6 +38,7 @@ public UserState()
|
|||
IsAuthenticated = false;
|
||||
LastDesktopSeen = true;
|
||||
LastDirectorySeen = true;
|
||||
LastQuality = -1;
|
||||
}
|
||||
|
||||
public void DisposeForms()
|
||||
|
|
Loading…
Reference in New Issue