Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Possibility of supporting multi-touch? #22

Closed
jgranick opened this issue Jun 7, 2012 · 3 comments
Closed

Possibility of supporting multi-touch? #22

jgranick opened this issue Jun 7, 2012 · 3 comments

Comments

@jgranick
Copy link
Contributor

jgranick commented Jun 7, 2012

Hi,

SDL 1.2 does not include support for multi-touch, officially. However, Palm patched SDL to provide support for multi-touch input by adding a "which" property to the mouse events, similar to how SDL defines a "which" property for joystick buttons.

I am not sure of the specifics of how multi-touch works "under the hood" on the PlayBook, but if it provides touch point IDs, perhaps it would be possible to expose them as a "which" property on the mouse events?

This would be extraordinary if it is possible, as we already have support for multi-touch in Android, iOS and webOS, and adding a "which" property would immediately add BlackBerry support.

Thank you!

@jnicholl
Copy link
Collaborator

jnicholl commented Jun 7, 2012

I believe we already support this? If you do not provide a sdl-controls.xml file, to tell SDL that you do not wish to use TouchControlOverlay, then I believe the SDL multi-mouse support will be used.
Take a look at SDL_playbookevents.c, handleMtouchEvent calls SDL_PrivateMultiMouseButton and provides the contact id as the 'which' parameter.
Let me know if it doesn't work or if part of the API is missing for you.

Thanks.

-----Original Message-----
From: Joshua Granick [mailto:reply@reply.github.com]
Sent: Wednesday, June 06, 2012 10:56 PM
To: Jeremy Nicholl
Subject: [SDL] Possibility of supporting multi-touch? (#22)

Hi,

SDL 1.2 does not include support for multi-touch, officially. However, Palm patched SDL to provide support for multi-touch input by adding a "which" property to the mouse events, similar to how SDL defines a "which" property for joystick buttons.

I am not sure of the specifics of how multi-touch works "under the hood" on the PlayBook, but if it provides touch point IDs, perhaps it would be possible to expose them as a "which" property on the mouse events?

This would be extraordinary if it is possible, as we already have support for multi-touch in Android, iOS and webOS, and adding a "which" property would immediately add BlackBerry support.

Thank you!


Reply to this email directly or view it on GitHub:
#22


This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

@jgranick
Copy link
Contributor Author

jgranick commented Jun 7, 2012

Awesome!

With your direction, I found the code that defines the "event.motion.which" property. It is used when TOUCHPAD_SIMULATE is not defined.

Turns out, the define is commented out, so multi-touch is enabled by default. I was able to change "#ifdef WEBOS" to "#if defined(WEBOS) || defined(BLACKBERRY)" in a few places to enable multi-touch in NME. It works great.

I am sorry I missed this, and excited you already had it implemented. Thank you!

@jgranick jgranick closed this as completed Jun 7, 2012
@hamlatzis
Copy link

I do receive mouse down/up & motion events for different fingers, but when I move two or more fingers at the same time the code runs sluggish. So it cannot be used for multi touch game

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants