Function pollEvent

Wraps SDL_PollEvent which returns the latest event in queue

Event pollEvent() @trusted;

Returns

dsdl.Event if there's an event, otherwise null

Example

// Polls every upcoming event in queue
dsdl.pumpEvents();
while (auto event = dsdl.pollEvent()){
    if (cast(dsdl.QuitEvent)event) {
        dsdl.quit();
    }
}