mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-12-24 23:51:49 +01:00
Make sure profile loading and saving works for X360Controls actions
This commit is contained in:
parent
24865da04b
commit
4ea9289a0d
@ -868,7 +868,16 @@ namespace DS4Windows
|
|||||||
isAnalog = true;
|
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)
|
if (xboxControl >= X360Controls.X && xboxControl <= X360Controls.A)
|
||||||
{
|
{
|
||||||
switch (xboxControl)
|
switch (xboxControl)
|
||||||
|
@ -1036,11 +1036,16 @@ namespace DS4Windows
|
|||||||
buttonNode.InnerText = dcs.action.ToString();
|
buttonNode.InnerText = dcs.action.ToString();
|
||||||
Key.AppendChild(buttonNode);
|
Key.AppendChild(buttonNode);
|
||||||
}
|
}
|
||||||
else if (dcs.action is string || dcs.action is X360Controls)
|
else if (dcs.action is string)
|
||||||
{
|
{
|
||||||
buttonNode.InnerText = dcs.action.ToString();
|
buttonNode.InnerText = dcs.action.ToString();
|
||||||
Button.AppendChild(buttonNode);
|
Button.AppendChild(buttonNode);
|
||||||
}
|
}
|
||||||
|
else if (dcs.action is X360Controls)
|
||||||
|
{
|
||||||
|
buttonNode.InnerText = getX360ControlString((X360Controls)dcs.action);
|
||||||
|
Button.AppendChild(buttonNode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hasvalue = false;
|
bool hasvalue = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user