I always called SDL_GetKeyState every frame. Now someone asked on irc should he
call it every frame, and SoM says: no.
I know this function gives pointer to array, but can we be sure this pointer
never changes? I think this is question about API, not current implementation.–
http://decopter.sf.net - free unrealistic helicopter simulator
I always called SDL_GetKeyState every frame. Now someone asked on irc should he
call it every frame, and SoM says: no.
It is safe (and inexpensive) to call SDL_GetKeyState() every frame.
This is the correct way of doing it.
The current implementation uses a single internal array, and will continue
to do so for all SDL 1.2.x releases.
See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment