Re: need delay while key not pressed

"bilsch01" <[email protected]>
Newsgroups gmane.comp.lib.sdl
Message-ID <[email protected]>
Naith wrote:
> Not sure I understand what you're trying to do. Explain a bit more what you're trying to achieve and I can try coming up with a solution for you.


When the program reaches the 'while' line (below) I want it to enter the loop and stay there burning time (500 ms per loop cycle) until the 'L' key is pressed, at which time it exits the loop.


Code:

while (event.type != SDL_KEYDOWN && event.key.keysym.scancode == SDL_SCANCODE_L)
    {
      SDL_Delay(500);
    }

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.