@@ -1464,37 +1464,43 @@ private void ProcessControlStateChange(int mapIndex, int controlIndex, int bindi
14641464 // If the binding is part of a composite, check for interactions on the composite
14651465 // itself and give them a first shot at processing the value change.
14661466 var haveInteractionsOnComposite = false ;
1467+ var compositeAlreadyTriggered = false ;
14671468 if ( bindingStatePtr ->isPartOfComposite )
14681469 {
14691470 var compositeBindingIndex = bindingStatePtr ->compositeOrCompositeBindingIndex ;
14701471 var compositeBindingPtr = & bindingStates [ compositeBindingIndex ] ;
14711472
1472- // If the composite has already been triggered from the very same event, ignore it .
1473+ // If the composite has already been triggered from the very same event set a flag so it isn't triggered again .
14731474 // Example: KeyboardState change that includes both A and W key state changes and we're looking
14741475 // at a WASD composite binding. There's a state change monitor on both the A and the W
14751476 // key and thus the manager will notify us individually of both changes. However, we
14761477 // want to perform the action only once.
1477- if ( ShouldIgnoreInputOnCompositeBinding ( compositeBindingPtr , eventPtr ) )
1478- return ;
1479-
1480- // Update magnitude for composite.
1481- var compositeIndex = bindingStates [ compositeBindingIndex ] . compositeOrCompositeBindingIndex ;
1482- var compositeContext = new InputBindingCompositeContext
1478+ // NOTE: Do NOT ignore this Event, we still need finish processing the individual button states.
1479+ if ( ! ShouldIgnoreInputOnCompositeBinding ( compositeBindingPtr , eventPtr ) )
14831480 {
1484- m_State = this ,
1485- m_BindingIndex = compositeBindingIndex
1486- } ;
1487- trigger . magnitude = composites [ compositeIndex ] . EvaluateMagnitude ( ref compositeContext ) ;
1488- memory . compositeMagnitudes [ compositeIndex ] = trigger . magnitude ;
1489-
1490- // Run through interactions on composite.
1491- var interactionCountOnComposite = compositeBindingPtr ->interactionCount ;
1492- if ( interactionCountOnComposite > 0 )
1481+ // Update magnitude for composite.
1482+ var compositeIndex = bindingStates [ compositeBindingIndex ] . compositeOrCompositeBindingIndex ;
1483+ var compositeContext = new InputBindingCompositeContext
1484+ {
1485+ m_State = this ,
1486+ m_BindingIndex = compositeBindingIndex
1487+ } ;
1488+ trigger . magnitude = composites [ compositeIndex ] . EvaluateMagnitude ( ref compositeContext ) ;
1489+ memory . compositeMagnitudes [ compositeIndex ] = trigger . magnitude ;
1490+
1491+ // Run through interactions on composite.
1492+ var interactionCountOnComposite = compositeBindingPtr ->interactionCount ;
1493+ if ( interactionCountOnComposite > 0 )
1494+ {
1495+ haveInteractionsOnComposite = true ;
1496+ ProcessInteractions ( ref trigger ,
1497+ compositeBindingPtr ->interactionStartIndex ,
1498+ interactionCountOnComposite ) ;
1499+ }
1500+ }
1501+ else
14931502 {
1494- haveInteractionsOnComposite = true ;
1495- ProcessInteractions ( ref trigger ,
1496- compositeBindingPtr ->interactionStartIndex ,
1497- interactionCountOnComposite ) ;
1503+ compositeAlreadyTriggered = true ;
14981504 }
14991505 }
15001506
@@ -1503,21 +1509,31 @@ private void ProcessControlStateChange(int mapIndex, int controlIndex, int bindi
15031509 // one of higher magnitude) or may even lead us to switch to processing a different binding
15041510 // (e.g. when an input of previously greater magnitude has now fallen below the level of another
15051511 // ongoing input with now higher magnitude).
1506- var isConflictingInput = IsConflictingInput ( ref trigger , actionIndex ) ;
1507- bindingStatePtr = & bindingStates [ trigger . bindingIndex ] ; // IsConflictingInput may switch us to a different binding.
1512+ //
1513+ // If Composite has already been triggered, skip this step; it's unnecessary and could also
1514+ // cause a processing issue if we switch to another binding.
1515+ var isConflictingInput = false ;
1516+ if ( ! compositeAlreadyTriggered )
1517+ {
1518+ isConflictingInput = IsConflictingInput ( ref trigger , actionIndex ) ;
1519+ bindingStatePtr = & bindingStates [ trigger . bindingIndex ] ; // IsConflictingInput may switch us to a different binding.
1520+ }
15081521
15091522 // Process button presses/releases.
1523+ // We MUST execute this processing even if Composite has already been triggered to ensure button states
1524+ // are properly updated (ISXB-746)
15101525 if ( ! isConflictingInput )
15111526 ProcessButtonState ( ref trigger , actionIndex , bindingStatePtr ) ;
15121527
15131528 // If we have interactions, let them do all the processing. The presence of an interaction
15141529 // essentially bypasses the default phase progression logic of an action.
1530+ // Interactions are skipped if compositeAlreadyTriggered is set.
15151531 var interactionCount = bindingStatePtr ->interactionCount ;
15161532 if ( interactionCount > 0 && ! bindingStatePtr ->isPartOfComposite )
15171533 {
15181534 ProcessInteractions ( ref trigger , bindingStatePtr ->interactionStartIndex , interactionCount ) ;
15191535 }
1520- else if ( ! haveInteractionsOnComposite && ! isConflictingInput )
1536+ else if ( ! haveInteractionsOnComposite && ! isConflictingInput && ! compositeAlreadyTriggered )
15211537 {
15221538 ProcessDefaultInteraction ( ref trigger , actionIndex ) ;
15231539 }
0 commit comments