From aeb035da5d1a4c2f6b4bcd453e6329a425e5abb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Trzci=C5=84ski?= Date: Sun, 27 Nov 2022 15:01:15 +0100 Subject: [PATCH] Allow to configure `StartupProfile` in `SteamController.dll.config` --- RELEASE.md | 1 + SteamController/App.config | 3 +++ SteamController/Controller.cs | 2 ++ SteamController/Settings.Designer.cs | 12 ++++++++++++ SteamController/Settings.settings | 3 +++ 5 files changed, 21 insertions(+) diff --git a/RELEASE.md b/RELEASE.md index e3b92ec..b5f2aac 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -15,6 +15,7 @@ - Configure Steam to switch between Steam Input or X360 Controller mode - Steam Games detection also works for X360 Controller mode - STEAM+B will kill foreground if hold longer than 3s +- Allow to configure `StartupProfile` in `SteamController.dll.config` ## 0.4.x diff --git a/SteamController/App.config b/SteamController/App.config index 4bb2fb6..7a9fc55 100644 --- a/SteamController/App.config +++ b/SteamController/App.config @@ -10,6 +10,9 @@ False + + Desktop + \ No newline at end of file diff --git a/SteamController/Controller.cs b/SteamController/Controller.cs index e04ed06..579ecdb 100644 --- a/SteamController/Controller.cs +++ b/SteamController/Controller.cs @@ -125,6 +125,8 @@ namespace SteamController stopwatch.Start(); + context.SelectProfile(Settings.Default.StartupProfile); + contextThread = new Thread(ContextState_Update); contextThread.Start(); } diff --git a/SteamController/Settings.Designer.cs b/SteamController/Settings.Designer.cs index 3e6c85a..1c541b2 100644 --- a/SteamController/Settings.Designer.cs +++ b/SteamController/Settings.Designer.cs @@ -34,5 +34,17 @@ namespace SteamController { this["EnableSteamDetection"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Desktop")] + public string StartupProfile { + get { + return ((string)(this["StartupProfile"])); + } + set { + this["StartupProfile"] = value; + } + } } } diff --git a/SteamController/Settings.settings b/SteamController/Settings.settings index 2f8dfb4..74d32a3 100644 --- a/SteamController/Settings.settings +++ b/SteamController/Settings.settings @@ -5,5 +5,8 @@ False + + Desktop + \ No newline at end of file