mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-04-25 19:54:58 +02:00
Fixed bug 1663 - SDL_EventState(SDL_DOLLARGESTURE,SDL_IGNORE) etc. has no effect
This commit is contained in:
parent
7d6f7e8d34
commit
2cb26188e1
@ -500,8 +500,9 @@ static SDL_GestureTouch * SDL_GetGestureTouch(SDL_TouchID id)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int SDL_SendGestureMulti(SDL_GestureTouch* touch,float dTheta,float dDist)
|
static void SDL_SendGestureMulti(SDL_GestureTouch* touch,float dTheta,float dDist)
|
||||||
{
|
{
|
||||||
|
if (SDL_GetEventState(SDL_MULTIGESTURE) == SDL_ENABLE) {
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
event.mgesture.type = SDL_MULTIGESTURE;
|
event.mgesture.type = SDL_MULTIGESTURE;
|
||||||
event.mgesture.touchId = touch->id;
|
event.mgesture.touchId = touch->id;
|
||||||
@ -510,13 +511,15 @@ static int SDL_SendGestureMulti(SDL_GestureTouch* touch,float dTheta,float dDist
|
|||||||
event.mgesture.dTheta = dTheta;
|
event.mgesture.dTheta = dTheta;
|
||||||
event.mgesture.dDist = dDist;
|
event.mgesture.dDist = dDist;
|
||||||
event.mgesture.numFingers = touch->numDownFingers;
|
event.mgesture.numFingers = touch->numDownFingers;
|
||||||
return SDL_PushEvent(&event) > 0;
|
SDL_PushEvent(&event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(ENABLE_DOLLAR)
|
#if defined(ENABLE_DOLLAR)
|
||||||
static int SDL_SendGestureDollar(SDL_GestureTouch* touch,
|
static void SDL_SendGestureDollar(SDL_GestureTouch* touch,
|
||||||
SDL_GestureID gestureId,float error)
|
SDL_GestureID gestureId,float error)
|
||||||
{
|
{
|
||||||
|
if (SDL_GetEventState(SDL_DOLLARGESTURE) == SDL_ENABLE) {
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
event.dgesture.type = SDL_DOLLARGESTURE;
|
event.dgesture.type = SDL_DOLLARGESTURE;
|
||||||
event.dgesture.touchId = touch->id;
|
event.dgesture.touchId = touch->id;
|
||||||
@ -526,17 +529,19 @@ static int SDL_SendGestureDollar(SDL_GestureTouch* touch,
|
|||||||
event.dgesture.error = error;
|
event.dgesture.error = error;
|
||||||
/* A finger came up to trigger this event. */
|
/* A finger came up to trigger this event. */
|
||||||
event.dgesture.numFingers = touch->numDownFingers + 1;
|
event.dgesture.numFingers = touch->numDownFingers + 1;
|
||||||
return SDL_PushEvent(&event) > 0;
|
SDL_PushEvent(&event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void SDL_SendDollarRecord(SDL_GestureTouch* touch,SDL_GestureID gestureId)
|
||||||
static int SDL_SendDollarRecord(SDL_GestureTouch* touch,SDL_GestureID gestureId)
|
|
||||||
{
|
{
|
||||||
|
if (SDL_GetEventState(SDL_DOLLARRECORD) == SDL_ENABLE) {
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
event.dgesture.type = SDL_DOLLARRECORD;
|
event.dgesture.type = SDL_DOLLARRECORD;
|
||||||
event.dgesture.touchId = touch->id;
|
event.dgesture.touchId = touch->id;
|
||||||
event.dgesture.gestureId = gestureId;
|
event.dgesture.gestureId = gestureId;
|
||||||
return SDL_PushEvent(&event) > 0;
|
SDL_PushEvent(&event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user