public void UpdateThumbStickMapping(ButtonNames button, GamepadThumbStickAction action)
        {
            Settings settings = _settingsRepository.Get();

            settings.SetThumbStickAction(button, action);
            _settingsRepository.Save(settings);
        }
        public void SetThumbStickAction(ButtonNames button, GamepadThumbStickAction action)
        {
            switch (button)
            {
            case ButtonNames.LeftThumb:
                Mappings.LeftThumbOffsetMapping = action;
                break;

            case ButtonNames.RightThumb:
                Mappings.RightThumbOffsetMapping = action;
                break;

            default:
                throw new ArgumentException();
            }
        }
        private void PerformThumbOffset(ButtonNames button, float magnitude, float x, float y)
        {
            GamepadThumbStickAction mapping = _settingsService.GetThumbStickMapping(button);

            switch (mapping)
            {
            case GamepadThumbStickAction.Scroll:
                Cursor.Current.MoveWheel((int)(y / Math.Abs(y)));
                break;

            case GamepadThumbStickAction.MoveMouse:
                int sensitivity = 5 + (int)(Math.Log(magnitude / 10000) * 20);
                for (int i = 0; i < sensitivity; i++)
                {
                    Cursor.Current.MoveBy((int)(x * Multiplier), -(int)(y * Multiplier));
                }
                break;
            }
        }