-
Notifications
You must be signed in to change notification settings - Fork 328
FIX: ISXB-687 Added guard clause to RemovePointerAtIndex in InputSy… #1982
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 3 commits
d280dff
8d3ca93
cb1bfb3
e600067
1cbfe3e
1f4e41c
6715e26
84e2ca4
d952c79
22183df
11b8a0e
456f737
43c0e80
c0d58cf
355499c
4671f6f
2eafdde
efe6c3c
cd89b85
b40142f
9699703
667c1dc
bb5b327
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 |
---|---|---|
|
@@ -1897,6 +1897,13 @@ private void RemovePointerAtIndex(int index) | |
{ | ||
Debug.Assert(m_PointerStates[index].eventData.pointerEnter == null, "Pointer should have exited all objects before being removed"); | ||
|
||
// We don't want to release touch pointers on the same frame they are released. They get cleaned up one frame later in Process() | ||
|
||
ref var state = ref GetPointerStateForIndex(index); | ||
if (state.pointerType == UIPointerType.Touch && (state.leftButton.isPressed || state.leftButton.wasReleasedThisFrame)) | ||
{ | ||
return; | ||
} | ||
|
||
// Retain event data so that we can reuse the event the next time we allocate a PointerModel record. | ||
var eventData = m_PointerStates[index].eventData; | ||
Debug.Assert(eventData != null, "Pointer state should have an event instance!"); | ||
|
Uh oh!
There was an error while loading. Please reload this page.