Skip to content

Commit

Permalink
Merge pull request Jays2Kings#102 from kiliansch/jay
Browse files Browse the repository at this point in the history
Switched config seperator from comma to pipe
  • Loading branch information
Jays2Kings authored Sep 20, 2016
2 parents a06d776 + 465056f commit 253363e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions DS4Windows/DS4Control/ScpUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ public bool SaveProfile(int device, string propath)
XmlNode xmlSZD = m_Xdoc.CreateNode(XmlNodeType.Element, "SZDeadZone", null); xmlSZD.InnerText = SZDeadzone[device].ToString(); Node.AppendChild(xmlSZD);

XmlNode xmlSens = m_Xdoc.CreateNode(XmlNodeType.Element, "Sensitivity", null);
xmlSens.InnerText = $"{LSSens[device]},{RSSens[device]},{l2Sens[device]},{r2Sens[device]},{SXSens[device]},{SZSens[device]}";
xmlSens.InnerText = $"{LSSens[device]}|{RSSens[device]}|{l2Sens[device]}|{r2Sens[device]}|{SXSens[device]}|{SZSens[device]}";
Node.AppendChild(xmlSens);

XmlNode xmlChargingType = m_Xdoc.CreateNode(XmlNodeType.Element, "ChargingType", null); xmlChargingType.InnerText = chargingType[device].ToString(); Node.AppendChild(xmlChargingType);
Expand Down Expand Up @@ -1388,7 +1388,12 @@ public Boolean LoadProfile(int device, bool launchprogram, ControlService contro
try
{
Item = m_Xdoc.SelectSingleNode("/" + rootname + "/Sensitivity");
string[] s = Item.InnerText.Split(',');
string[] s = Item.InnerText.Split('|');
if (s.Length != 6)
{
s = Item.InnerText.Split(',');
}

double.TryParse(s[0], out LSSens[device]);
double.TryParse(s[1], out RSSens[device]);
double.TryParse(s[2], out l2Sens[device]);
Expand Down

0 comments on commit 253363e

Please sign in to comment.