Exemple #1
0
        public static JoystickBase getJoyStickByName(string name)
        {
            var joysticklist = getDevices();

            foreach (var device in joysticklist)
            {
                if (device.ProductName.TrimUnPrintable() == name)
                {
                    var js = new JoystickWindows(() => null);
                    js.AcquireJoystick(name);
                    return(js);
                }
            }

            return(null);
        }