[SDL] Event Handling

Sam Lantinga slouken at devolution.com
Tue Nov 30 07:33:29 PST 2004


> 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




More information about the SDL mailing list