Esempio n. 1
0
        internal void SetHat(JoystickHat hat, JoystickHatState value)
        {
            switch (hat)
            {
            case JoystickHat.Hat0:
                hat0 = value;
                break;

            case JoystickHat.Hat1:
                hat1 = value;
                break;

            case JoystickHat.Hat2:
                hat2 = value;
                break;

            case JoystickHat.Hat3:
                hat3 = value;
                break;

            default:
                throw new ArgumentOutOfRangeException("hat");
            }
        }
Esempio n. 2
0
        internal void SetHat(JoystickHat hat, JoystickHatState value)
        {
            switch (hat)
            {
            case JoystickHat.Hat0:
                hat0 = value;
                break;

            case JoystickHat.Hat1:
                hat1 = value;
                break;

            case JoystickHat.Hat2:
                hat2 = value;
                break;

            case JoystickHat.Hat3:
                hat3 = value;
                break;

            default:
                return;
            }
        }