Event Handling

What is the problem of using SDL_PollEvent() to deal with events instead
of using SDL_GetKeyState() and SDL_GetMouseState()?–
Lucas Clemente Vella
@Lucas_Clemente_Vella

What is the problem of using SDL_PollEvent() to deal with events instead
of using SDL_GetKeyState() and SDL_GetMouseState()?

Basically SDL_GetKeyState() gives you the current state after all events
have been processed, so if a key or button has been pressed and released
before you process events, then the pressed state will never show up in
the getstate calls.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment