Allow LoadProfile action key to be used without unload trigger in a loadProfile special action definition and without temp profile lockdown. This way loadProfile special actions can be linked to load unlimited number of profiles without unloading (=untrigger) the current temp profile first.

This commit is contained in:
mika-n 2019-04-07 14:33:42 +03:00
parent 746587ebbd
commit 1e82db0f9e

View File

@ -1896,11 +1896,15 @@ namespace DS4Windows
{
actionFound = true;
if (!actionDone[index].dev[device] && !useTempProfile[device])
if (!actionDone[index].dev[device] && (!useTempProfile[device] || untriggeraction[device] == null || untriggeraction[device].typeID != SpecialAction.ActionTypeId.Profile) )
{
actionDone[index].dev[device] = true;
// If Loadprofile special action doesn't have unload trigger then don't set untrigger status. This way the new loaded profile allows yet another loadProfile action key events)
if (action.uTrigger.Count > 0)
{
untriggeraction[device] = action;
untriggerindex[device] = index;
}
//foreach (DS4Controls dc in action.trigger)
for (int i = 0, arlen = action.trigger.Count; i < arlen; i++)
{