示例#1
0
        private void SetInputExternal(ISServerSocket client)
        {
            if (!CurrentInputClient.IsLocalhost && CurrentInputClient.IsConnected)
            {
                CurrentInputClient.NotifyActiveClient(false);
            }

            inputMan.SetInputBlocked(true);
            CurrentInputClient = client;
            client.NotifyActiveClient(true);
            InputClientSwitched?.Invoke(this, client);
        }
示例#2
0
        private void SetInputLocal()
        {
            if (!CurrentInputClient.IsLocalhost && CurrentInputClient.IsConnected)
            {
                CurrentInputClient.NotifyActiveClient(false);
            }

            inputMan.SetInputBlocked(false);
            CurrentInputClient = ISServerSocket.Localhost;
            //TODO - reset key states?
            InputClientSwitched?.Invoke(this, ISServerSocket.Localhost);
        }
示例#3
0
 public void HandleInputReceived(ISInputData input)
 {
     if (CurrentInputClient != ISServerSocket.Localhost)
     {
         if (CurrentInputClient.IsConnected)
         {
             if (CurrentInputClient.UdpEnabled && udpHost != null)
             {
                 udpHost.SendInput(input, CurrentInputClient);
             }
             else
             {
                 CurrentInputClient.SendInputData(input.ToBytes());
             }
         }
         else
         {
             ISLogger.Write("TARGET NOT CONNECTED");
         }
     }
 }