Use this function to check for the existence of a range of event types in the event queue.
SDL_bool SDL_HasEvents(Uint32 minType, Uint32 maxType)
the minimum type of event to be queried; see SDL_EventType for details
the maximum type of event to be queried; see SDL_EventType for details
Returns SDL_TRUE if events with types in the range between minType and maxType are present, or SDL_FALSE if not.
You can add your code example here
If you need to check for a single event type, you can use SDL_HasEvent() instead.