The "quit requested" event
Defined in [SDL_events.h](https://github.com/libsdl-org/SDL/blob/SDL2/include/SDL_events.h), but apps should _only_ `#include "SDL.h"`!
typedef struct SDL_QuitEvent
{/**< ::SDL_QUIT */
Uint32 type; /**< In milliseconds, populated using SDL_GetTicks() */
Uint32 timestamp; } SDL_QuitEvent;
SDL_Event e;for (;;) {
SDL_PollEvent(&e);if (e.type == SDL_QUIT) {
"Program quit after %i ticks", e.quit.timestamp);
SDL_Log(break;
} }
Uint32 |
type |
SDL_QUIT |
Uint32 |
timestamp |
timestamp of the event |
CategoryAPI, CategoryAPIStruct, CategoryStruct, CategoryEvents