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
This commit is contained in:
Travis Nickles 2020-03-05 06:27:58 -06:00
parent c312155f00
commit e980cb911c
2 changed files with 14 additions and 1 deletions

View File

@ -144,7 +144,7 @@ namespace DS4WinWPF
//Directory.CreateDirectory(DS4Windows.Global.appdatapath + @"\Profiles\"); //Directory.CreateDirectory(DS4Windows.Global.appdatapath + @"\Profiles\");
//Directory.CreateDirectory(DS4Windows.Global.appdatapath + @"\Macros\"); //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[0] = DS4Windows.Global.OlderProfilePath[0] = "Default";
/*DS4Windows.Global.ProfilePath[1] = DS4Windows.Global.OlderProfilePath[1] = "Default"; /*DS4Windows.Global.ProfilePath[1] = DS4Windows.Global.OlderProfilePath[1] = "Default";
DS4Windows.Global.ProfilePath[2] = DS4Windows.Global.OlderProfilePath[2] = "Default"; DS4Windows.Global.ProfilePath[2] = DS4Windows.Global.OlderProfilePath[2] = "Default";

View File

@ -1786,6 +1786,11 @@ namespace DS4Windows
m_Config.SaveProfile(device, propath); m_Config.SaveProfile(device, propath);
} }
public static void SaveAsNewProfile(int device, string propath)
{
m_Config.SaveAsNewProfile(device, propath);
}
public static bool SaveLinkedProfiles() public static bool SaveLinkedProfiles()
{ {
return m_Config.SaveLinkedProfiles(); return m_Config.SaveLinkedProfiles();
@ -2404,6 +2409,14 @@ namespace DS4Windows
return result; 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) public bool SaveProfile(int device, string propath)
{ {
bool Saved = true; bool Saved = true;