need delay while key not pressed
"bilsch01" <[email protected]>
| Newsgroups | gmane.comp.lib.sdl |
|---|---|
| Message-ID | <[email protected]> |
A previous press of 'L' key in an outer WHILE loop set lflag to 1. Now execution reaches the inner WHILE loop shown below. The intention is to delay the program in the WHILE loop until the 'L' key is pressed - but it doesn't delay.
Code:
if (lflag==1)
while (event.type != SDL_KEYDOWN && event.key.keysym.scancode == SDL_SCANCODE_L) // long mode
{ SDL_Delay(500);
}
lflag=0;
Thanks. Bill S.
_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org