Skip to content

Commit

Permalink
SteamController: Add X360: No Touchpads profile
Browse files Browse the repository at this point in the history
  • Loading branch information
ayufan committed Feb 8, 2023
1 parent d0c45a1 commit fd93c05
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

## 0.6.x

- SteamController: Add `X360: No Touchpads` profile
- All: Show `Missing RTSS` button to install RTSS
- PowerControl: Retain FPS Limit (proportion) on refresh rate change
- PowerControl: Support RTSS in custom folder
Expand Down
3 changes: 2 additions & 1 deletion SteamController/Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ internal class Controller : IDisposable
new Profiles.Predefined.DesktopProfile() { Name = "Desktop" },
new Profiles.Predefined.SteamProfile() { Name = "Steam", Visible = false },
new Profiles.Predefined.SteamWithShorcutsProfile() { Name = "Steam with Shortcuts", Visible = false },
new Profiles.Predefined.X360HapticProfile() { Name = "X360" }
new Profiles.Predefined.X360HapticProfile() { Name = "X360", EmulateTouchPads = true },
new Profiles.Predefined.X360HapticProfile() { Name = "X360: No Touchpads", EmulateTouchPads = false }
},
Managers = {
new Managers.ProcessManager(),
Expand Down
8 changes: 5 additions & 3 deletions SteamController/Profiles/Predefined/X360Profile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ public class X360Profile : Default.BackPanelShortcutsProfile
{
public static readonly TimeSpan HoldToggleTouchPads = TimeSpan.FromMilliseconds(2000);
public const String TouchPadsConsumed = "TouchPads";
public static bool TouchPadsEnabled { get; set; } = true;
public bool EmulateTouchPads { get; set; } = true;

private bool TouchPadsEnabled { get; set; } = true;

public override bool Selected(Context context)
{
Expand Down Expand Up @@ -35,12 +37,12 @@ public override Status Run(Context context)
return Status.Done;
}

if (context.Steam.BtnLPadPress.Hold(HoldToggleTouchPads, TouchPadsConsumed) && context.Steam.BtnRPadPress.HoldOnce(HoldToggleTouchPads, TouchPadsConsumed))
if (EmulateTouchPads && context.Steam.BtnLPadPress.Hold(HoldToggleTouchPads, TouchPadsConsumed) && context.Steam.BtnRPadPress.HoldOnce(HoldToggleTouchPads, TouchPadsConsumed))
{
TouchPadsEnabled = !TouchPadsEnabled;
}

if (TouchPadsEnabled)
if (TouchPadsEnabled && EmulateTouchPads)
{
// Default emulation
EmulateScrollOnLPad(context);
Expand Down

0 comments on commit fd93c05

Please sign in to comment.