diff --git a/RELEASE.md b/RELEASE.md index b5f2aac..102542c 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -16,6 +16,7 @@ - Steam Games detection also works for X360 Controller mode - STEAM+B will kill foreground if hold longer than 3s - Allow to configure `StartupProfile` in `SteamController.dll.config` +- Increase joystick speed and key repeats in Desktop Mode ## 0.4.x diff --git a/SteamController/Context.cs b/SteamController/Context.cs index 639b335..1e64fae 100644 --- a/SteamController/Context.cs +++ b/SteamController/Context.cs @@ -7,9 +7,7 @@ namespace SteamController public const double JoystickToMouseSensitivity = 1200; public const double PadToMouseSensitivity = 150; public const double PadToWhellSensitivity = 4; - public const double ThumbToWhellSensitivity = 4; - public static readonly TimeSpan ThumbToWhellFirstRepeat = TimeSpan.FromMilliseconds(30 * ThumbToWhellSensitivity); - public static readonly TimeSpan ThumbToWhellRepeat = TimeSpan.FromMilliseconds(30 * ThumbToWhellSensitivity); + public const double ThumbToWhellSensitivity = 20; public Devices.SteamController Steam { get; private set; } public Devices.Xbox360Controller X360 { get; private set; } @@ -81,7 +79,7 @@ namespace SteamController } catch (Exception e) { - TraceLine("Manager: {0}. Exception: {1}", e); + TraceLine("Manager: {0}. Exception: {1}", manager, e); } } } diff --git a/SteamController/Devices/KeyboardController.cs b/SteamController/Devices/KeyboardController.cs index 2d5a3ba..0b8665f 100644 --- a/SteamController/Devices/KeyboardController.cs +++ b/SteamController/Devices/KeyboardController.cs @@ -5,8 +5,8 @@ namespace SteamController.Devices { public class KeyboardController : IDisposable { - public static readonly TimeSpan FirstRepeat = TimeSpan.FromMilliseconds(75); - public static readonly TimeSpan NextRepeats = TimeSpan.FromMilliseconds(150); + public static readonly TimeSpan FirstRepeat = TimeSpan.FromMilliseconds(400); + public static readonly TimeSpan NextRepeats = TimeSpan.FromMilliseconds(45); InputSimulator simulator = new InputSimulator(); diff --git a/SteamController/Devices/SteamAction.cs b/SteamController/Devices/SteamAction.cs index 55a2f85..d3fe1e0 100644 --- a/SteamController/Devices/SteamAction.cs +++ b/SteamController/Devices/SteamAction.cs @@ -46,8 +46,8 @@ namespace SteamController.Devices public class SteamButton : SteamAction { public static readonly TimeSpan DefaultHoldDuration = TimeSpan.FromMilliseconds(10); - public static readonly TimeSpan DefaultFirstHold = TimeSpan.FromMilliseconds(75); - public static readonly TimeSpan DefaultRepeatHold = TimeSpan.FromMilliseconds(150); + public static readonly TimeSpan DefaultFirstHold = TimeSpan.FromMilliseconds(400); + public static readonly TimeSpan DefaultRepeatHold = TimeSpan.FromMilliseconds(45); private bool rawValue, rawLastValue; diff --git a/SteamController/Profiles/DefaultGuideShortcutsProfile.cs b/SteamController/Profiles/DefaultGuideShortcutsProfile.cs index 43852f2..cd02af3 100644 --- a/SteamController/Profiles/DefaultGuideShortcutsProfile.cs +++ b/SteamController/Profiles/DefaultGuideShortcutsProfile.cs @@ -83,12 +83,12 @@ namespace SteamController.Profiles c.Keyboard.KeyPress(VirtualKeyCode.LWIN, VirtualKeyCode.SNAPSHOT); } - if (c.Steam.BtnVirtualLeftThumbUp.HoldRepeat(ShortcutConsumed)) + if (c.Steam.BtnVirtualLeftThumbUp.JustPressed() || c.Steam.BtnVirtualLeftThumbUp.HoldRepeat(ShortcutConsumed)) { WindowsSettingsBrightnessController.Increase(5); } - if (c.Steam.BtnVirtualLeftThumbDown.HoldRepeat(ShortcutConsumed)) + if (c.Steam.BtnVirtualLeftThumbDown.JustPressed() || c.Steam.BtnVirtualLeftThumbDown.HoldRepeat(ShortcutConsumed)) { WindowsSettingsBrightnessController.Increase(-5); } diff --git a/SteamController/Profiles/DesktopProfile.cs b/SteamController/Profiles/DesktopProfile.cs index bc41d95..297156c 100644 --- a/SteamController/Profiles/DesktopProfile.cs +++ b/SteamController/Profiles/DesktopProfile.cs @@ -55,21 +55,13 @@ namespace SteamController.Profiles private void EmulateScrollOnLStick(Context c) { - if (c.Steam.BtnVirtualLeftThumbUp.HoldRepeat(Context.ThumbToWhellFirstRepeat, Context.ThumbToWhellRepeat, Consumed)) + if (c.Steam.LeftThumbX) { - c.Mouse.VerticalScroll(Context.ThumbToWhellSensitivity); + c.Mouse.HorizontalScroll(c.Steam.LeftThumbX.DeltaValue * Context.ThumbToWhellSensitivity); } - else if (c.Steam.BtnVirtualLeftThumbDown.HoldRepeat(Context.ThumbToWhellFirstRepeat, Context.ThumbToWhellRepeat, Consumed)) + if (c.Steam.LeftThumbY) { - c.Mouse.VerticalScroll(-Context.ThumbToWhellSensitivity); - } - else if (c.Steam.BtnVirtualLeftThumbLeft.HoldRepeat(Context.ThumbToWhellFirstRepeat, Context.ThumbToWhellRepeat, Consumed)) - { - c.Mouse.HorizontalScroll(-Context.ThumbToWhellSensitivity); - } - else if (c.Steam.BtnVirtualLeftThumbRight.HoldRepeat(Context.ThumbToWhellFirstRepeat, Context.ThumbToWhellRepeat, Consumed)) - { - c.Mouse.HorizontalScroll(Context.ThumbToWhellSensitivity); + c.Mouse.VerticalScroll(c.Steam.LeftThumbY.DeltaValue * Context.ThumbToWhellSensitivity); } }