mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-04 22:07:40 +00:00
Introduce X360 Haptic Profile (in DEBUG)
This commit is contained in:
parent
a92a0661df
commit
8ffa5d967f
4 changed files with 82 additions and 9 deletions
38
SteamController/ProfilesSettings/X360HapticSettings.cs
Normal file
38
SteamController/ProfilesSettings/X360HapticSettings.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
using System.ComponentModel;
|
||||
using System.Configuration;
|
||||
using WindowsInput;
|
||||
|
||||
namespace SteamController.ProfilesSettings
|
||||
{
|
||||
[Category("Settings")]
|
||||
internal sealed class X360HapticSettings : BaseSettings
|
||||
{
|
||||
public const sbyte MinIntensity = -2;
|
||||
public const sbyte MaxIntensity = 10;
|
||||
|
||||
public static X360HapticSettings Default { get; } = (X360HapticSettings)ApplicationSettingsBase.Synchronized(
|
||||
new X360HapticSettings("X360HapticSettings"));
|
||||
|
||||
public X360HapticSettings(String settingsKey) : base(settingsKey)
|
||||
{
|
||||
}
|
||||
|
||||
[UserScopedSettingAttribute()]
|
||||
[DefaultSettingValueAttribute("0")]
|
||||
[Description("Haptic intensity between -2dB and 10dB")]
|
||||
public sbyte LeftIntensity
|
||||
{
|
||||
get { return ((sbyte)(this["LeftIntensity"])); }
|
||||
set { this["LeftIntensity"] = Math.Clamp(value, MinIntensity, MaxIntensity); }
|
||||
}
|
||||
|
||||
[UserScopedSettingAttribute()]
|
||||
[DefaultSettingValueAttribute("0")]
|
||||
[Description("Haptic intensity between -2dB and 10dB")]
|
||||
public sbyte RightIntensity
|
||||
{
|
||||
get { return ((sbyte)(this["RightIntensity"])); }
|
||||
set { this["RightIntensity"] = Math.Clamp(value, MinIntensity, MaxIntensity); }
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue