SteamController: Add X360: No Touchpads profile

This commit is contained in:
Kamil Trzciński 2023-02-08 21:43:09 +01:00
parent d0c45a1474
commit fd93c051fa
3 changed files with 8 additions and 4 deletions

View file

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

View file

@ -29,7 +29,8 @@ namespace SteamController
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(),

View file

@ -7,7 +7,9 @@ namespace SteamController.Profiles.Predefined
{
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)
{
@ -35,12 +37,12 @@ namespace SteamController.Profiles.Predefined
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);