Update SDL to the latest source code (2.0.9 + e1e13e154128)

This commit is contained in:
Alex Szpakowski
2018-12-31 16:11:13 -04:00
parent 45dbeb26c3
commit 0c10f91bf8
481 changed files with 111284 additions and 21729 deletions
+13 -2
View File
@@ -86,6 +86,16 @@ SDL_GetTouch(SDL_TouchID id)
return SDL_touchDevices[index];
}
SDL_TouchDeviceType
SDL_GetTouchDeviceType(SDL_TouchID id)
{
SDL_Touch *touch = SDL_GetTouch(id);
if (touch) {
return touch->type;
}
return SDL_TOUCH_DEVICE_INVALID;
}
static int
SDL_GetFingerIndex(const SDL_Touch * touch, SDL_FingerID fingerid)
{
@@ -133,7 +143,7 @@ SDL_GetTouchFinger(SDL_TouchID touchID, int index)
}
int
SDL_AddTouch(SDL_TouchID touchID, const char *name)
SDL_AddTouch(SDL_TouchID touchID, SDL_TouchDeviceType type, const char *name)
{
SDL_Touch **touchDevices;
int index;
@@ -163,6 +173,7 @@ SDL_AddTouch(SDL_TouchID touchID, const char *name)
/* we're setting the touch properties */
SDL_touchDevices[index]->id = touchID;
SDL_touchDevices[index]->type = type;
SDL_touchDevices[index]->num_fingers = 0;
SDL_touchDevices[index]->max_fingers = 0;
SDL_touchDevices[index]->fingers = NULL;
@@ -304,7 +315,7 @@ SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid,
prel = pressure - finger->pressure;
/* Drop events that don't change state */
if (!xrel && !yrel && !prel) {
if (xrel == 0.0f && yrel == 0.0f && prel == 0.0f) {
#if 0
printf("Touch event didn't change state - dropped!\n");
#endif