[SDL] No key pressed
Alan Wolfe
atrix2 at cox.net
Wed Jan 28 13:54:01 PST 2004
nope thats not correct, it always returns a pointer to the state array of
the keys, even if no keys are pressed.
----- Original Message -----
From: "saf [TrashMail.net]" <sdl at xy1.org>
To: <sdl at libsdl.org>
Sent: Wednesday, January 28, 2004 1:41 PM
Subject: Re: [SDL] No key pressed
> 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.
>
> _______________________________________________
> SDL mailing list
> SDL at libsdl.org
> http://www.libsdl.org/mailman/listinfo/sdl
More information about the SDL
mailing list