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