@@ -162,29 +162,29 @@ private void ComputeControlGroupingIfNecessary()
162162
163163 var action = GetActionOrNull ( bindingIndex ) ;
164164
165- var priority = Math . Clamp ( action != null ? action . Priority : 0 , 0 , 65536 ) ;
165+ var priority = Math . Clamp ( action != null && ! disableControlGrouping ? action . Priority : 0 , 0 , 65536 ) ;
166166
167167 controlGroupingAndPriority [ i * 2 + 1 ] = ( ushort ) priority ;
168168
169169 // Compute grouping. If already set, skip.
170170 if ( controlGroupingAndPriority [ i * 2 ] == 0 )
171171 {
172- //if (!disableControlGrouping)
173- //{
174- for ( var n = 0 ; n < totalControlCount ; ++ n )
172+ if ( ! disableControlGrouping )
175173 {
176- // NOTE: We could compute group numbers based on device index + control offsets
177- // and thus make them work globally in a stable way. But we'd need a mechanism
178- // to then determine ordering of actions globally such that it is clear which
179- // action gets a first shot at an input.
174+ for ( var n = 0 ; n < totalControlCount ; ++ n )
175+ {
176+ // NOTE: We could compute group numbers based on device index + control offsets
177+ // and thus make them work globally in a stable way. But we'd need a mechanism
178+ // to then determine ordering of actions globally such that it is clear which
179+ // action gets a first shot at an input.
180180
181- var otherControl = controls [ n ] ;
182- if ( control != otherControl )
183- continue ;
181+ var otherControl = controls [ n ] ;
182+ if ( control != otherControl )
183+ continue ;
184184
185- controlGroupingAndPriority [ n * 2 ] = ( ushort ) currentGroup ;
185+ controlGroupingAndPriority [ n * 2 ] = ( ushort ) currentGroup ;
186+ }
186187 }
187- //}
188188
189189 controlGroupingAndPriority [ i * 2 ] = ( ushort ) currentGroup ;
190190
0 commit comments