Use SteamControllerConfigsMode.Overwrite for controller configs

This commit is contained in:
Kamil Trzciński 2022-12-04 20:51:21 +01:00
parent 6e84fc2043
commit 4a7909b485
3 changed files with 12 additions and 7 deletions

View file

@ -28,7 +28,7 @@ namespace SteamController.Managers
private bool IsActive
{
get { return Settings.Default.ManageSteamControllerConfigs && Settings.Default.EnableSteamDetection; }
get { return Settings.Default.SteamControllerConfigs == Settings.SteamControllerConfigsMode.Overwrite && Settings.Default.EnableSteamDetection; }
}
public override void Dispose()

View file

@ -10,7 +10,7 @@ namespace SteamController.Profiles
public override bool Selected(Context context)
{
return context.Enabled && context.State.SteamUsesSteamInput && !Settings.Default.ManageSteamControllerConfigs;
return context.Enabled && context.State.SteamUsesSteamInput && Settings.Default.SteamControllerConfigs != Settings.SteamControllerConfigsMode.Overwrite;
}
public override Status Run(Context context)

View file

@ -52,6 +52,12 @@ namespace SteamController
set { this["ScrollDirection"] = value; }
}
public enum SteamControllerConfigsMode
{
DoNotTouch,
Overwrite
}
#if DEBUG
[UserScopedSetting]
[BrowsableAttribute(true)]
@ -59,13 +65,12 @@ namespace SteamController
[ApplicationScopedSetting]
[BrowsableAttribute(false)]
#endif
[DefaultSettingValue("False")]
[DisplayName("Manage Steam Controller Configs")]
[DefaultSettingValue("DoNotTouch")]
[Description("This does replace Steam configuration for controllers to prevent double inputs")]
public bool ManageSteamControllerConfigs
public SteamControllerConfigsMode SteamControllerConfigs
{
get { return ((bool)(this["ManageSteamControllerConfigs"])); }
set { this["ManageSteamControllerConfigs"] = value; }
get { return ((SteamControllerConfigsMode)(this["SteamControllerConfigs"])); }
set { this["SteamControllerConfigs"] = value; }
}
public override string ToString()