Ejemplo n.º 1
0
        private static void UpdateActiveDevice()
        {
            InputDevice inputDevice = ActiveDevice;
            int         count       = devices.Count;

            for (int i = 0; i < count; i++)
            {
                InputDevice inputDevice2 = devices[i];
                if (inputDevice2.LastChangedAfter(ActiveDevice) && !inputDevice2.Passive)
                {
                    ActiveDevice = inputDevice2;
                }
            }
            if (inputDevice != ActiveDevice && InputManager.OnActiveDeviceChanged != null)
            {
                InputManager.OnActiveDeviceChanged(ActiveDevice);
            }
        }