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); }
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); }
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"); } } }