mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2025-01-13 16:49:08 +01:00
Make sure to use proper macro values for controller button presses
Related to issue #1002
This commit is contained in:
parent
6baeb51b58
commit
7a79dc569a
@ -308,22 +308,21 @@ namespace DS4WinWPF.DS4Forms.ViewModels
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
keysdownMap.TryGetValue((int)dc, out bool isdown);
|
int macroValue = Global.macroDS4Values[dc];
|
||||||
|
keysdownMap.TryGetValue(macroValue, out bool isdown);
|
||||||
if (!isdown && Mapping.getBoolMapping(0, dc, cState, null, null))
|
if (!isdown && Mapping.getBoolMapping(0, dc, cState, null, null))
|
||||||
{
|
{
|
||||||
int macroValue = Global.macroDS4Values[dc];
|
|
||||||
MacroStep step = new MacroStep(macroValue, MacroParser.macroInputNames[macroValue],
|
MacroStep step = new MacroStep(macroValue, MacroParser.macroInputNames[macroValue],
|
||||||
MacroStep.StepType.ActDown, MacroStep.StepOutput.Button);
|
MacroStep.StepType.ActDown, MacroStep.StepOutput.Button);
|
||||||
AddMacroStep(step);
|
AddMacroStep(step);
|
||||||
keysdownMap.Add((int)dc, true);
|
keysdownMap.Add(macroValue, true);
|
||||||
}
|
}
|
||||||
else if (isdown && !Mapping.getBoolMapping(0, dc, cState, null, null))
|
else if (isdown && !Mapping.getBoolMapping(0, dc, cState, null, null))
|
||||||
{
|
{
|
||||||
int macroValue = Global.macroDS4Values[dc];
|
|
||||||
MacroStep step = new MacroStep(macroValue, MacroParser.macroInputNames[macroValue],
|
MacroStep step = new MacroStep(macroValue, MacroParser.macroInputNames[macroValue],
|
||||||
MacroStep.StepType.ActUp, MacroStep.StepOutput.Button);
|
MacroStep.StepType.ActUp, MacroStep.StepOutput.Button);
|
||||||
AddMacroStep(step);
|
AddMacroStep(step);
|
||||||
keysdownMap.Remove((int)dc);
|
keysdownMap.Remove(macroValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user