Hello,
This question might have been asked already,
but what is the current state of support for
the multitouch pads on macs ?
Will it be only available on 1.3 ?
Thanks,
Julien CLEMENT
@Julien_Clement1
Hello,
This question might have been asked already,
but what is the current state of support for
the multitouch pads on macs ?
Will it be only available on 1.3 ?
Thanks,
Julien CLEMENT
@Julien_Clement1
I’ve checked the uikit sources in latest 1.3 HG - it will send you
SDL_FINGERDOWN / SDL_FINGERUP / SDL_FINGERMOTION with appropriate finger ID.On Thu, Oct 21, 2010 at 1:36 PM, Julien CLEMENT wrote:
Hello,
This question might have been asked already,
but what is the current state of support for
the multitouch pads on macs ?Will it be only available on 1.3 ?
Thanks,
Julien CLEMENT
clementj2005 at yahoo.fr
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
<<<
typedef struct SDL_TouchFingerEvent
{
Uint32 type; /< ::SDL_FINGERMOTION OR
SDL_FINGERDOWN OR SDL_FINGERUP*/
Uint32 windowID; /< The window with mouse focus, if any */
SDL_TouchID touchId; /< The touch device id */
SDL_FingerID fingerId;
Uint8 state; /< The current button state */
Uint8 padding1;
Uint8 padding2;
Uint8 padding3;
Uint16 x;
Uint16 y;
Sint16 dx;
Sint16 dy;
Uint16 pressure;
} SDL_TouchFingerEvent;
Ok so here is the main event structure associated with multitouch.
Thank you for your work, didn’t test it yet, I’ll keep you updated,
Julien CLEMENT
@Julien_Clement1-----------
I’ve checked the uikit sources in latest 1.3 HG - it will send you
SDL_FINGERDOWN / SDL_FINGERUP / SDL_FINGERMOTION with appropriate finger ID.
Padding is to pad structure members to 4 bytes boundary, isn’t that obvious?
just ignore that field.
If you’re programming on ARM microprocessor you need all integers to be
padded to 4-byte boundary, and all short ints to be padded to 2 bytes.
Some ARM CPUs allow for accessing non-aligned members, others will just
return you garbage insstead of value, an I don’t know which one they use in
iPhone.
TouchID should be useful only if you have two or three touch screens on a
device (imagine yourself two iPhones stickied together). And you’ll have
just one touch ID anyway, guessing from the SDL code.
Pressure is not used, and always reported as 1 (however it’s reported on
Android, Android owns iPhone, whee ).
The SDL should generate separate independent events for each of your
fingers. So, I guess answer is - yes.On Thu, Oct 21, 2010 at 11:53 PM, Julien CLEMENT wrote:
<<<
typedef struct SDL_TouchFingerEvent
{
Uint32 type; /< ::SDL_FINGERMOTION OR
SDL_FINGERDOWN OR SDL_FINGERUP*/
Uint32 windowID; /< The window with mouse focus, if any */
SDL_TouchID touchId; /< The touch device id */
SDL_FingerID fingerId;
Uint8 state; /< The current button state */
Uint8 padding1;
Uint8 padding2;
Uint8 padding3;
Uint16 x;
Uint16 y;
Sint16 dx;
Sint16 dy;
Uint16 pressure;
} SDL_TouchFingerEvent;Ok so here is the main event structure associated with multitouch.
- I suppose the touchId is made in case there’re multiple touching
interfaces ?- What is padding ?
- Is ‘pressure’ used in the case of MacBook Pros, I don’t know if it’s
pressure sensitive.- Stupid question but, if more than one finger is touching and/or moving at
the same time,
does the engine generate as many events ?Thank you for your work, didn’t test it yet, I’ll keep you updated,
Julien CLEMENT
clementj2005 at yahoo.fr
I’ve checked the uikit sources in latest 1.3 HG - it will send you
SDL_FINGERDOWN / SDL_FINGERUP / SDL_FINGERMOTION with appropriate finger
ID.
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Hello,
I’ve tested the multitouch on mac, it works like a charm.
Why is it that the FingerId returns numbers like "2330432"
and not simple integers like 0,1,2,3 (easier to handle internally) ?
Is it a print format problem ? I tried to cast to an int and use
both printf and cout with the same result.
Best,
Julien CLEMENT
@Julien_Clement1
I ran into this same issue, on Android its always 0,1,etc, on Mac though its usually in the 2 million range. Does anyone know why? Now I’ll have to store the touchid and later reference it, rather than simply using 0 or 1.