From e980cb911c2e3cad46e4294e194b490e9757459c Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Thu, 5 Mar 2020 06:27:58 -0600 Subject: [PATCH] Make sure to use my custom settings for the first created (Default) profile The older Jays2Kings values were being used when creating a new program config --- DS4Windows/App.xaml.cs | 2 +- DS4Windows/DS4Control/ScpUtil.cs | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/DS4Windows/App.xaml.cs b/DS4Windows/App.xaml.cs index 7819cfe..018095c 100644 --- a/DS4Windows/App.xaml.cs +++ b/DS4Windows/App.xaml.cs @@ -144,7 +144,7 @@ namespace DS4WinWPF //Directory.CreateDirectory(DS4Windows.Global.appdatapath + @"\Profiles\"); //Directory.CreateDirectory(DS4Windows.Global.appdatapath + @"\Macros\"); - DS4Windows.Global.SaveProfile(0, "Default"); + DS4Windows.Global.SaveAsNewProfile(0, "Default"); DS4Windows.Global.ProfilePath[0] = DS4Windows.Global.OlderProfilePath[0] = "Default"; /*DS4Windows.Global.ProfilePath[1] = DS4Windows.Global.OlderProfilePath[1] = "Default"; DS4Windows.Global.ProfilePath[2] = DS4Windows.Global.OlderProfilePath[2] = "Default"; diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index e1a97cf..9a68cc8 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -1786,6 +1786,11 @@ namespace DS4Windows m_Config.SaveProfile(device, propath); } + public static void SaveAsNewProfile(int device, string propath) + { + m_Config.SaveAsNewProfile(device, propath); + } + public static bool SaveLinkedProfiles() { return m_Config.SaveLinkedProfiles(); @@ -2404,6 +2409,14 @@ namespace DS4Windows return result; } + public bool SaveAsNewProfile(int device, string propath) + { + bool Saved = true; + ResetProfile(device); + Saved = SaveProfile(device, propath); + return Saved; + } + public bool SaveProfile(int device, string propath) { bool Saved = true;