internal static void UpdateInternal()
 {
     AssertIsSetup();
     if (InputManager.OnSetup != null)
     {
         InputManager.OnSetup();
         InputManager.OnSetup = null;
     }
     if (enabled && (!SuspendInBackground || applicationIsFocused))
     {
         currentTick++;
         UpdateCurrentTime();
         float num = currentTime - lastUpdateTime;
         UpdateDeviceManagers(num);
         CommandWasPressed = false;
         UpdateDevices(num);
         CommitDevices(num);
         UpdateActiveDevice();
         UpdatePlayerActionSets(num);
         if (InputManager.OnUpdate != null)
         {
             InputManager.OnUpdate(currentTick, num);
         }
         lastUpdateTime = currentTime;
     }
 }
        internal static bool SetupInternal()
        {
            if (IsSetup)
            {
                return(false);
            }
            Platform             = Utility.GetWindowsVersion().ToUpper();
            enabled              = true;
            initialTime          = 0f;
            currentTime          = 0f;
            lastUpdateTime       = 0f;
            currentTick          = 0uL;
            applicationIsFocused = true;
            deviceManagers.Clear();
            deviceManagerTable.Clear();
            devices.Clear();
            Devices      = new ReadOnlyCollection <InputDevice>(devices);
            activeDevice = InputDevice.Null;
            playerActionSets.Clear();
            IsSetup = true;
            bool flag = true;

            if (EnableNativeInput && NativeInputDeviceManager.Enable())
            {
                flag = false;
            }
            if (EnableXInput && flag)
            {
                XInputDeviceManager.Enable();
            }
            if (InputManager.OnSetup != null)
            {
                InputManager.OnSetup();
                InputManager.OnSetup = null;
            }
            if (flag)
            {
                AddDeviceManager <UnityInputDeviceManager>();
            }
            return(true);
        }