Added README.touch and README.gesture. Moved touchtest/gestureSDLTest to test/testgesture

This commit is contained in:
Jim Grandpre 2010-08-15 00:36:28 -04:00
parent 68b3cfb42f
commit 794c5cb3ee
10 changed files with 464 additions and 13 deletions

View file

@ -462,6 +462,8 @@ int SDL_SendGestureDollar(SDL_GestureTouch* touch,
*/
event.dgesture.gestureId = gestureId;
event.dgesture.error = error;
//A finger came up to trigger this event.
event.dgesture.numFingers = touch->numDownFingers + 1;
return SDL_PushEvent(&event) > 0;
}
@ -471,7 +473,6 @@ int SDL_SendDollarRecord(SDL_GestureTouch* touch,SDL_GestureID gestureId) {
event.dgesture.type = SDL_DOLLARRECORD;
event.dgesture.touchId = touch->id;
event.dgesture.gestureId = gestureId;
return SDL_PushEvent(&event) > 0;
}

View file

@ -351,6 +351,7 @@ SDL_SendFingerDown(SDL_TouchID id, SDL_FingerID fingerid, SDL_bool down,
event.tfinger.touchId = id;
event.tfinger.x = x;
event.tfinger.y = y;
event.tfinger.pressure = pressure;
event.tfinger.state = touch->buttonstate;
event.tfinger.windowID = touch->focus ? touch->focus->id : 0;
event.tfinger.fingerId = fingerid;
@ -470,8 +471,7 @@ SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid, int relative,
event.tfinger.x = x;
event.tfinger.y = y;
event.tfinger.dx = xrel;
event.tfinger.dy = yrel;
event.tfinger.dy = yrel;
event.tfinger.pressure = pressure;
event.tfinger.state = touch->buttonstate;