How does one get dual touch touch to work on the android?
EG code I’ve been using, seems like I have to use SDL_FINGERDOWN instead of mouse down.
I’m sure if it’s all correct.
Should there be SDL_FINGERDOWN 2?
if (event.type == SDL_FINGERDOWN)
{
bFingerDown = true;
SDL_GetMouseState(&iMouseX, &iMouseY);
}
if (event.type == SDL_FINGERMOTION)
{
bFingerDown = true;
SDL_GetMouseState(&iMouseX, &iMouseY);
}
if (event.type == SDL_FINGERUP)
{
Check out the SDL_TouchFingerEvent structure:
http://wiki.libsdl.org/moin.fcg/SDL_TouchFingerEvent
This is part of the event union as event.tfinger. Do not use
SDL_GetMouseState(), since that is for mice and that is for state (not
events - use event.button for mouse button events).
To handle multitouch, you would keep track of event.tfinger.touchId (the
device) and event.tfinger.fingerId (the touch). I use a std::map from a
touchId/fingerId pair to app-specific data.
Jonny DOn Sun, Jun 2, 2013 at 3:38 AM, Timodor wrote:
**
How does one get dual touch touch to work on the android?
EG code I’ve been using, seems like I have to use SDL_FINGERDOWN instead
of mouse down.
I’m sure if it’s all correct.
Should there be SDL_FINGERDOWN 2?
if (event.type == SDL_FINGERDOWN)
{
bFingerDown = true;
SDL_GetMouseState(&iMouseX, &iMouseY);
}
if (event.type == SDL_FINGERMOTION)
{
bFingerDown = true;
SDL_GetMouseState(&iMouseX, &iMouseY);
}
if (event.type == SDL_FINGERUP)
{
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org