[SDL] No key pressed

saf [TrashMail.net] sdl at xy1.org
Wed Jan 28 13:42:01 PST 2004


On Wed, Jan 28, 2004 at 07:19:52PM -0200, Bruce @ OpenGL wrote:
> Hi folks,
> 
> To see which key was pressed, I use SDL_GetKeyState in this way:
> 
> Uint8* keys;
> keys = SDL_GetKeyState(NULL);
> 
> then I check here:
> 
> if (keys[SDLK_UP])
>   { do something; }
> 
> But and if I want to check if no key was pressed, after a call to
> SDL_GetKeyState ???

I'm not sure, but try if SDL_GetKeyState returns NULL if no key was 
pressed.

-- 
saf at http://TrashMail.net/
No more spam, free disposable email addresses.




More information about the SDL mailing list