diff --git a/RELEASE.md b/RELEASE.md index 40d2d9e..222ac03 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -22,3 +22,4 @@ It does help this project on being supported. - Fix bug with unable to select controller profile from OSD - Skip repeated haptic requests - Allow to select Default profile (Desktop-mode profile) +- Allow to change scroll direction diff --git a/SteamController/Profiles/DefaultGuideShortcutsProfile.cs b/SteamController/Profiles/DefaultGuideShortcutsProfile.cs index 6eea63f..ddd2b99 100644 --- a/SteamController/Profiles/DefaultGuideShortcutsProfile.cs +++ b/SteamController/Profiles/DefaultGuideShortcutsProfile.cs @@ -132,7 +132,7 @@ namespace SteamController.Profiles } if (c.Steam.LPadY) { - c.Mouse.VerticalScroll(c.Steam.LPadY.DeltaValue * Context.PadToWhellSensitivity); + c.Mouse.VerticalScroll(c.Steam.LPadY.DeltaValue * Context.PadToWhellSensitivity * (double)Settings.Default.ScrollDirection); } } diff --git a/SteamController/Profiles/DesktopProfile.cs b/SteamController/Profiles/DesktopProfile.cs index 8ebc8ea..dfb8648 100644 --- a/SteamController/Profiles/DesktopProfile.cs +++ b/SteamController/Profiles/DesktopProfile.cs @@ -60,7 +60,7 @@ namespace SteamController.Profiles } if (c.Steam.LeftThumbY) { - c.Mouse.VerticalScroll(c.Steam.LeftThumbY.DeltaValue * Context.ThumbToWhellSensitivity); + c.Mouse.VerticalScroll(c.Steam.LeftThumbY.DeltaValue * Context.ThumbToWhellSensitivity * (double)Settings.Default.ScrollDirection); } } diff --git a/SteamController/Settings.cs b/SteamController/Settings.cs index c46f714..1e0691a 100644 --- a/SteamController/Settings.cs +++ b/SteamController/Settings.cs @@ -3,7 +3,6 @@ using System.Configuration; namespace SteamController { - [Category("Settings")] [TypeConverter(typeof(ExpandableObjectConverter))] internal sealed partial class Settings : ApplicationSettingsBase @@ -37,6 +36,22 @@ namespace SteamController set { this["DefaultProfile"] = value; } } + public enum ScrollMode : int + { + DownScrollUp = -1, + DownScrollDown = 1 + } + + [UserScopedSetting] + [DefaultSettingValue("DownScrollDown")] + [Description("Scroll direction for right pad and joystick.")] + [BrowsableAttribute(true)] + public ScrollMode ScrollDirection + { + get { return ((ScrollMode)(this["ScrollDirection"])); } + set { this["ScrollDirection"] = value; } + } + #if DEBUG [UserScopedSetting] [BrowsableAttribute(true)]