2022-12-03 17:49:23 +01:00
|
|
|
using System.ComponentModel;
|
|
|
|
|
using System.Configuration;
|
|
|
|
|
|
|
|
|
|
namespace SteamController.ProfilesSettings
|
|
|
|
|
{
|
|
|
|
|
[Category("Settings")]
|
2022-12-08 10:24:40 +01:00
|
|
|
internal sealed class X360HapticSettings : CommonHelpers.BaseSettings
|
2022-12-03 17:49:23 +01:00
|
|
|
{
|
|
|
|
|
public const sbyte MinIntensity = -2;
|
|
|
|
|
public const sbyte MaxIntensity = 10;
|
|
|
|
|
|
2022-12-08 10:24:40 +01:00
|
|
|
public static X360HapticSettings Default = new X360HapticSettings();
|
2022-12-03 17:49:23 +01:00
|
|
|
|
2022-12-08 10:24:40 +01:00
|
|
|
public X360HapticSettings() : base("X360HapticSettings")
|
2022-12-03 17:49:23 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2022-12-05 18:35:25 +01:00
|
|
|
public Devices.SteamController.HapticStyle HapticStyle
|
|
|
|
|
{
|
2022-12-08 10:24:40 +01:00
|
|
|
get { return Get<Devices.SteamController.HapticStyle>("HapticStyle", Devices.SteamController.HapticStyle.Weak); }
|
|
|
|
|
set { Set("HapticStyle", value); }
|
2022-12-05 18:35:25 +01:00
|
|
|
}
|
|
|
|
|
|
2022-12-03 17:49:23 +01:00
|
|
|
[Description("Haptic intensity between -2dB and 10dB")]
|
|
|
|
|
public sbyte LeftIntensity
|
|
|
|
|
{
|
2022-12-08 10:24:40 +01:00
|
|
|
get { return Get<sbyte>("LeftIntensity", 2); }
|
|
|
|
|
set { Set("LeftIntensity", Math.Clamp(value, MinIntensity, MaxIntensity)); }
|
2022-12-03 17:49:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Description("Haptic intensity between -2dB and 10dB")]
|
|
|
|
|
public sbyte RightIntensity
|
|
|
|
|
{
|
2022-12-08 10:24:40 +01:00
|
|
|
get { return Get<sbyte>("RightIntensity", 2); }
|
|
|
|
|
set { Set("RightIntensity", Math.Clamp(value, MinIntensity, MaxIntensity)); }
|
2022-12-03 17:49:23 +01:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|