diff --git a/src/events/SDL_categories.c b/src/events/SDL_categories.c index 9be9ec8cc1..aa9eff86b8 100644 --- a/src/events/SDL_categories.c +++ b/src/events/SDL_categories.c @@ -144,6 +144,11 @@ SDL_EventCategory SDL_GetEventCategory(Uint32 type) case SDL_EVENT_FINGER_MOTION: return SDL_EVENTCATEGORY_TFINGER; + case SDL_EVENT_PINCH_BEGIN: + case SDL_EVENT_PINCH_UPDATE: + case SDL_EVENT_PINCH_END: + return SDL_EVENTCATEGORY_PINCH; + case SDL_EVENT_CLIPBOARD_UPDATE: return SDL_EVENTCATEGORY_CLIPBOARD; @@ -247,6 +252,9 @@ SDL_Window *SDL_GetWindowFromEvent(const SDL_Event *event) case SDL_EVENTCATEGORY_RENDER: windowID = event->render.windowID; break; + case SDL_EVENTCATEGORY_PINCH: + windowID = event->pinch.windowID; + break; default: // < 0 -> invalid event type (error is set by SDL_GetEventCategory) // else -> event has no associated window (not an error) diff --git a/src/events/SDL_categories_c.h b/src/events/SDL_categories_c.h index 59cef81eb5..3bd047bb19 100644 --- a/src/events/SDL_categories_c.h +++ b/src/events/SDL_categories_c.h @@ -65,6 +65,7 @@ typedef enum SDL_EventCategory SDL_EVENTCATEGORY_CLIPBOARD, SDL_EVENTCATEGORY_RENDER, SDL_EVENTCATEGORY_NOTIFICATION, + SDL_EVENTCATEGORY_PINCH, } SDL_EventCategory; extern SDL_EventCategory SDL_GetEventCategory(Uint32 type);