Allow to change scroll direction

This commit is contained in:
Kamil Trzciński 2022-12-04 20:39:00 +01:00
parent 271cb5d94e
commit b0863b89ef
4 changed files with 19 additions and 3 deletions

View file

@ -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

View file

@ -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);
}
}

View file

@ -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);
}
}

View file

@ -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)]