We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4884 - [Patch] Add support for multitouch on iOS
Summary: [Patch] Add support for multitouch on iOS
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 2.0.10
Hardware: iPhone/iPod touch iOS (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-30 23:39 UTC by Aaron Barany
Modified: 2019-12-08 19:29 UTC (History)
0 users

See Also:


Attachments
Add support for multitouch on iOS. (2.93 KB, patch)
2019-11-30 23:39 UTC, Aaron Barany
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Barany 2019-11-30 23:39:15 UTC
Created attachment 4080 [details]
Add support for multitouch on iOS.

Rather than using hard-coded touch IDs for a single touch, use the UITouch pointer as the touch ID. Since SDL_TouchID is a 64-bit integer, this should be a lossless
conversion, and according to the documentation for UITouch (https://developer.apple.com/documentation/uikit/uitouch) it is guaranteed to persist between events.
Comment 1 Sam Lantinga 2019-12-04 06:27:42 UTC
The SDL touch ID is an input device, not a finger ID.
For example, if a system had 3 trackpads they would each get their own touch ID, and then any multi-touch input on each device would come through with it's own finger ID.
Comment 2 Aaron Barany 2019-12-04 07:06:12 UTC
Thanks, I misunderstood the meaning of the IDs. I originally had problems with 2.0.9, and while the code had changed with 2.0.10, the management for touchId 1 should be more or less the same. (the patch I submitted was an updated version for the one I was using locally for 2.0.9 to fix it)

When I have a chance, I will verify whether or not I can still reproduce the lack of multitouch with the normal 2.0.10 code. If not, I may re-open this ticket with an updated patch that takes the proper IDs into account.
Comment 3 Sam Lantinga 2019-12-04 13:53:56 UTC
Sure, that would be great, thanks!
Comment 4 Aaron Barany 2019-12-07 21:52:15 UTC
I double checked and it looks like it is working as expected. I probably had other problems preventing multitouch from working when I first implemented the patch and didn't realize that it was a separate change that fixed it.
Comment 5 Sam Lantinga 2019-12-08 19:29:53 UTC
Great, I'm glad you fixed it.