diff --git a/DS4Windows/DS4Control/Mapping.cs b/DS4Windows/DS4Control/Mapping.cs index daf64fe..2dad546 100644 --- a/DS4Windows/DS4Control/Mapping.cs +++ b/DS4Windows/DS4Control/Mapping.cs @@ -868,7 +868,16 @@ namespace DS4Windows isAnalog = true; } - X360Controls xboxControl = getX360ControlsByName(action.ToString()); + X360Controls xboxControl = X360Controls.None; + if (action is X360Controls) + { + xboxControl = (X360Controls)action; + } + else if (action is string) + { + xboxControl = getX360ControlsByName(action.ToString()); + } + if (xboxControl >= X360Controls.X && xboxControl <= X360Controls.A) { switch (xboxControl) diff --git a/DS4Windows/DS4Control/ScpUtil.cs b/DS4Windows/DS4Control/ScpUtil.cs index e8b5ffd..51ac85a 100644 --- a/DS4Windows/DS4Control/ScpUtil.cs +++ b/DS4Windows/DS4Control/ScpUtil.cs @@ -1036,11 +1036,16 @@ namespace DS4Windows buttonNode.InnerText = dcs.action.ToString(); Key.AppendChild(buttonNode); } - else if (dcs.action is string || dcs.action is X360Controls) + else if (dcs.action is string) { buttonNode.InnerText = dcs.action.ToString(); Button.AppendChild(buttonNode); } + else if (dcs.action is X360Controls) + { + buttonNode.InnerText = getX360ControlString((X360Controls)dcs.action); + Button.AppendChild(buttonNode); + } } bool hasvalue = false;