Fix issue with multi-action button not working

Related to issue #26.
This commit is contained in:
Travis Nickles 2017-05-08 07:27:41 -07:00
parent c3fcfbfddf
commit 4980cd01dc

View File

@ -1721,8 +1721,10 @@ namespace DS4Windows
DS4Device d = ctrl.DS4Controllers[device]; DS4Device d = ctrl.DS4Controllers[device];
//cus //cus
DS4State tempPrevState = d.getPreviousState();
DS4StateFieldMapping tempPrevMapping = new DS4StateFieldMapping(tempPrevState, eState, tp);
bool activeCur = getBoolMapping2(device, action.trigger[0], cState, eState, tp, fieldMapping); bool activeCur = getBoolMapping2(device, action.trigger[0], cState, eState, tp, fieldMapping);
bool activePrev = getBoolMapping2(device, action.trigger[0], d.getPreviousState(), eState, tp, fieldMapping); bool activePrev = getBoolMapping2(device, action.trigger[0], tempPrevState, eState, tp, tempPrevMapping);
if (activeCur && !activePrev) if (activeCur && !activePrev)
{ {
// pressed down // pressed down