-
Notifications
You must be signed in to change notification settings - Fork 335
FIX: Composite touchscreen controls not firing action after enabling (ISXB-98) #1540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
42d9890
72e2317
23b1ee5
720d051
86e6865
f8d93f1
30d9fa8
cc90791
db3ecab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -261,8 +261,15 @@ public void SortMonitorsByIndex() | |
| // Insertion sort. | ||
| for (var i = 1; i < signalled.length; ++i) | ||
| { | ||
| for (var j = i; j > 0 && listeners[j - 1].monitorIndex < listeners[j].monitorIndex; --j) | ||
| for (var j = i; j > 0; --j) | ||
| { | ||
| // Sort by complexities only to keep the sort stable | ||
| // i.e. don't reverse the order of controls which have the same complexity | ||
| var firstComplexity = InputActionState.GetComplexityFromMonitorIndex(listeners[j - 1].monitorIndex); | ||
| var secondComplexity = InputActionState.GetComplexityFromMonitorIndex(listeners[j].monitorIndex); | ||
| if (firstComplexity >= secondComplexity) | ||
| break; | ||
|
Comment on lines
+267
to
+271
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we remove sorting by monitorIndex, which includes the binding index in the lowest bits, we'll end up processing bindings in potentially a different order than they are specified in the input asset. I can't decide if that's ok or not. Wasn't there some discussion recently in devs-input about a team using the explicit order of bindings to fall through to less specific bindings if more specific ones weren't available? Can this break that?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The sorting was merged on the 24th March and it effectively was reversing the order they would have been in before. So bindings with the sorting enabled were now in descending order e.g. 4,3,2,1. This PR change would keep them in whatever order they were before 24th March (which I think would be ascending). I'm not sure about the order in the asset or about the binding fall through discussion, but I'm thinking unless these things were post 24th March, then they might have also been broken by adding the sort, and this PR should probably help restore those too?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. XR team is using it for this use-case and might have a project to test with, contact @chris-massie may provide insight
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, good point. |
||
|
|
||
| listeners.SwapElements(j, j - 1); | ||
| memoryRegions.SwapElements(j, j - 1); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.