If I first use SDL_PollEvent(NULL) and then SDL_PollEvent(&event) with some non-NULL event, and sometimes get different results. Namely, the first one returns true as if there was some event, and the second one returns false… How come ?
In the same loop, if I only use SDL_PollEvent(&event) I also get false…
From this I tend to think that SDL_PollEvent(NULL) is not reliable: there must be a bug?
However, calling SDL_PollEvent(NULL) duplicates the work of SDL_PollEvent(&event), so if you’re able to handle the events right away, you should just call SDL_PollEvent(&event) directly.