From 465056fff15412ecdd29644ef7a7cd41280644b2 Mon Sep 17 00:00:00 2001 From: Kilian Schuster Date: Mon, 7 Mar 2016 18:18:03 +0100 Subject: [PATCH] Switched config seperator from comma to pipe to not collide with german comma seperated decimals --- DS4Windows/DS4Control/ScpUtil.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index 801e593..02a0541 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -751,7 +751,7 @@ namespace DS4Windows 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); @@ -1388,7 +1388,12 @@ namespace DS4Windows 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]);